. . .

Magento Admin URL Error 404 Fix

Published: September 24, 2011

On This Page

    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.

    Don't forget to share this post

      Let's Build Digital Excellence Together


      • Cost Efficient Solutions.
      • Minimal Timelines.
      • Effective Communication.
      • High Quality Standards.
      • Lifetime Support.
      • Transparent Execution.
      • 24/7 Availability.
      • Scalable Teams.

      Join Our 200+ Happy Clients Across Globe


      Free Consultation.

        Do you need tech help of your startup/business? Experts from our team will get in touch with you.

        Please do not post jobs/internships inquiries here.