0

I have a magento 2.2. based website I had setup on a hosting account that used domain http://development.domain.com . I now moved the mysql and the files over to what will be the production hosting account so the site is now located at http://www.domain.com/v2 After I moved the files and database I then via mysql workbench edited the core_config_data table making the web/unsecure/base_url and the web/secure/base_url . columns have www.domain.com/v2/ .

However now when I go to http://www.domain.com/v2 the main magento page loads however if I click any category or product it redirects me to www.domain.com/ . So like if I click a category named shirts I am being directed to http://www.domain.com/shirts instead of https://www.domain.com/v2/shirts

I also am not able to access the admin panel it just redirects to the url without the /v2/ I checked .htaccess doesnt have any rewrite rules.

I also re-indexed on the cli and compiled and cleared cache. still no change? So what am I miising to do?

1 Answer 1

1

Its resolved by this query.

SET FOREIGN_KEY_CHECKS=0;
UPDATE `store` SET store_id = 0 WHERE code='admin';
UPDATE `store_group` SET group_id = 0 WHERE name='Default';
UPDATE `store_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

After this login to ssh and run below query step by setp.

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.