Magento Admin 404 page not found


The issue admin 404 page not found usually appears when database was moved and it loses integrity keys.  Also it may happened when you migrate website to different hosting. You will not notice that issues exist until you will try to login to magento admin page.  The magento admin 404 page not found issue will be shown in this case. The issue will show admin 404 page not found and it doesn't mean that this page not exist.  if you will check Magento admin log: 
var/log/system.log
you will see lines which reporting this issue.

Magento Admin 404 page not found log entry

The log entry for admin 404 page not found issue will look like:
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_PATHppcodecoreMageCoreModelApp.php on line 555 and defined in YOUR_PATHppcodecoreMageCoreModelStore.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_PATHppcodecoreMageCoreModelApp.php on line 575 and defined in YOUR_PATHppcodecoreMageCoreModelStoreGroup.php on line 227
Also you may see this PHP Notice message:
Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92
 

The solution of Magento Admin 404 page not found issue

The solution of issue is set default values for magento database.  To perform it you need to open PhpMyAdmin or any other mysql client and execute the following mysql query below. Please make sure to add table prefix in case you have prefix for your magento store
After query will be complete you can check again access to magento admin panel. This query will fix the magento admin 404 page not found issue and allow you to login to magento admin page.   It sets store_id for magento admin store view to default  0 value and resets customer group id for not logged users  to default zero value. Hope it was helpful and it solved your magento admin 404 page not found issue.
Created On February 11, 2015
You May Also Like