I'm having a problem which I've never experienced before when moving a Magento website to a new server.

The transfer was complete and the website is working fine, the only problem is that the admin URL gives a 404 page.

The URL for the admin panel was suppose to be:


I've also tried:


However the 404 is still there.

I've had a look at the local.xml and the tag is set to 'admin'.

var session/cache was all deleted. The rest of the site seems to work fine apart from this 404 error.

Any help is much appreciated.


2 Answers 2


404 issues are quite common when migrating Magento installations between servers. As per this post on SO please see the following answer

Magento Admin 404

You need to go your server directly and do this via SSH/ FTP

You have to delete the following file:


If you get an error after that like:

Notice: Undefined index: 0 in /srv/www/vhosts/javra.com/htdocs/munchad2/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

Then go to your Database Management:

  • Open PhpMyAdmin
  • Go to your database
  • Click SQL
  • Run the following SQL Query


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';

Definitely backup the file & your database prior to running these changes.

Alternately, double check your .htaccess files which are also sometimes the bane of the issue.

  • My 'app/etc/use_cache.ser' didn't exist so I just ran the SQL queries, they worked perfectly. Thank you for your help!
    – thairish
    Apr 23, 2014 at 19:38
  • Interesting, strange how something like that vanishes during a migration. Glad you managed to sort things out.
    – Moose
    Apr 24, 2014 at 5:45
  • I have the same issue as OP, yet running the SQL query doesn't change anything. Those values are already okay.
    – pspahn
    Nov 6, 2014 at 19:12
  • 1
    My Magento database doesn't even have these tables so I can't run it..? Nov 11, 2014 at 1:05
  • app/etc/use_cache.ser is a holdover from Magento 1.3.x.x and isn't used by 1.4.x.x and later. The cache information held in this file was moved into a database table. Jun 16, 2015 at 16:48

It might be, that you didn't export the AUTOINCREMENT keys, this leads to the problem, that all the stuff which in Magento has normally id 0, like:

  • admin store
  • NOT_LOGGED_IN customer group

has some id which leads to problems.

To fix the store, you have to run:

UPDATE `core_store` SET store_id = 0 WHERE code = 'admin';

But be careful, because there might be more broken!

Your Answer

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

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