Home » Magento3 March 2011

Magento: Solution to “Error: 404 Not Found” in Admin Login Page


I transferred my Magento site files from one computer to another. I imported the database. Now, when I try to login to admin (when I go to admin login url), it shows 404 Not Found Error page. The same error is also displayed in the module’s page that are installed in site.

However, the frontend part is working fine. There is no such error in browsing categories and pages in frontend.


If you have enabled System Log in Magento then you can see the log. It is present in var/log/system.log.

It shows the following error:-

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATH\app\code\core\Mage\Core\Model\App.php on line 555 and defined in YOUR_PATH\app\code\core\Mage\Core\Model\Store.php on line 285

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATH\app\code\core\Mage\Core\Model\App.php on line 575 and defined in YOUR_PATH\app\code\core\Mage\Core\Model\Store\Group.php on line 227


I had already written about this problem before. Have a look at this:-

Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website

The exact solution for this problem is present over here:-

Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

The solution is to run the following MySQL query on your Magento database:

After that, Refresh Cache (System -> Cache Management).

That’s all. This should solve the error.

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Luca

    I followed this steps, but when I go to admn page, all CSS and JS are missing! Any idea?

  • Luca

    I think I found the solution… Try without deleting the “var” folder content! It worked for me on magento 1.5!!

  • I most of the time look at this 404 error, also i have come across 500 internal server error, some times i have got this Recoverable Error too, thanks for sharing,.

  • Rajeshdungrani

    I am still not able to solve the problem

  • Annemarijne

    I did as you said, by going to the phpMyAdmin, but I´m getting the same error.

  • Gowri Sankar

    Thats Great!!! worked like a charm…

  • Jaimin

    in my case i have multi domain store and when i transfer from one host to another it gives me 404 error on frontend and my backend works whats the step i have to follow for my frontend

  • Pgautam

    its work for me thanks a lot man

  • Pingback: ecommerceheroes.com – Magento Technical Support | 404 Magento Admin Login Page()

  • Ritzi

    I have forgot my login id and passwrd… Can you help??? plzzzzzzzzzzz

  • pejman

    use this config in phpmyadmin

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

    and flush the cache foolder
    that`s it.