After moving Magento site to new server/location we often get "Error: 404 Not Found" while accessing the admin / back-end. The reason of this error is store_id and website_id should be set to "0" (zero). For some reason when you import the database the values get changed to other than zero.
Following is small MySQL query code which will fix this issue.
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_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;
Run this code via phpmyadmin or any other mean you are accessing your new database of Magento.
3 Comments
Saved my life! Thank you.
sir
this tick is not working .is there any another solution?
Hemant,
What version of Magento you are working with? Is there any extra extension installed? Do let me know about the details.
Regards
[-Nabeel-]