Skip to content

Mukesh Chapagain Blog

  • PHP
    • PHP
    • Laravel
    • WordPress
    • Joomla
  • Magento
    • Magento 2
    • Magento Extension
  • Node.js
    • Node.js
    • Javascript
    • jQuery
  • Database
    • MySQL
    • MongoDB
  • Data Science
    • Machine Learning
    • Recommender System
    • Natural Language Processing (NLP)
    • Sentiment Analysis
    • Python
    • R
  • Categories
    • Blockchain
      • Hyperledger Composer
      • Hyperledger-Fabric
    • Other
      • Cryptography
      • Data Structures & Algorithms
      • Git
      • LaTeX
      • Linux
      • Ubuntu
      • Xubuntu
      • Google
      • Google AppScript
  • About
    • About
    • Contact
    • Privacy Policy

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

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

August 19, 2017March 3, 2011 by Mukesh Chapagain
Categories Magento Tags 404 error, admin login, Magento
FacebookTweetLinkedInPinPrintEmailShares

Problem:

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.

Cause:

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

Solution:

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:


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;

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

That’s all. This should solve the error.

Hope this helps. Thanks.

Related posts:

  1. Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website
  2. Magento Admin login problem
  3. Magento 2: Admin Login Error – Your current session has been expired
  4. Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92
Categories Magento Tags 404 error, admin login, Magento
Magento jQuery: How to use them together?
Magento: How to get admin user id, name, username, email, etc?

About

Mukesh Chapagain Hi, I’m Mukesh Chapagain — a web developer, programmer, and tech enthusiast. Whether you're a beginner or an experienced developer, you’ll find tips, tutorials, and insights to help you navigate the ever-evolving world of technology. Happy coding! 🚀 about...

         

Subscribe via Email



Categories

Most Viewed

  • How to Calculate Inverter & Battery Backup Time? - 428,020 views
  • Very Simple Add, Edit, Delete, View (CRUD) in PHP & MySQL [Beginner Tutorial] - 415,656 views
  • LaTeX: Generate dummy text (lorem ipsum) in your document - 228,050 views
  • GPG: Remove keys from your public keyring? - 201,573 views
  • Magento: How to get attribute name and value? - 188,264 views

Recent Posts

  • Magento: The store that was requested wasn’t found. Verify the store and try again.
  • Magento2: Check Services version on Adobe Cloud Server
  • Magento 2 API: Add Products to Cart & Checkout Place Order
  • Magento 2 API: Create New Customer
  • Magento 2 API: Get Categories

Recent Posts

  • Magento: The store that was requested wasn’t found. Verify the store and try again.
  • Magento2: Check Services version on Adobe Cloud Server
  • Magento 2 API: Add Products to Cart & Checkout Place Order
  • Magento 2 API: Create New Customer
  • Magento 2 API: Get Categories

Most Viewed

  • How to Calculate Inverter & Battery Backup Time? - 428,020 views
  • Very Simple Add, Edit, Delete, View (CRUD) in PHP & MySQL [Beginner Tutorial] - 415,656 views
  • LaTeX: Generate dummy text (lorem ipsum) in your document - 228,050 views
  • GPG: Remove keys from your public keyring? - 201,573 views
  • Magento: How to get attribute name and value? - 188,264 views

Tag Cloud

admin Adobe Commerce api array attribute block category checkout CLI command line crud currency customer Database error extension git Google grid HTML image Javascript Joomla jQuery latex Linux login Magento magento2 magento 2 module MySQL natural language processing NLP nltk nodejs order PHP product python shopping cart template Ubuntu url Wordpress
© 2025 Mukesh Chapagain Blog
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy