While surfing in a Magento store website, a user sometimes faces the 404 error in admin URL. Here we have discussed the 5 causes with the solutions to make it easier for you to resolve.
2. What is a
404 Error?
404 Error on a website means that the web page you were searching for
was not found. Generally, its because of 2 reasons like:
Entered a
wrong URL
1 Web page
has been
removed
2
In technical terms the 404 or Not Found error is an HTTP standard
response code showing that the client was able to interact with a
distributed server, but the server could not locate what the requested
resource.
3. Cause
The values of store_id and website_id
should be zero for admin in a Magento
database.
But, these values can vary when store
owners transfer the database to the new
server, and users may face the 404 errors in
Magento admin login page.
Solution
You have to reset the value of store_id and
website_id to zero for admin in the Magento
database.
To reset website_id to 0 in the core_website
table, follow below command,
UPDATE 'core_website' SET website_id =0
WHERE code='admin';
Causes with
Solutions
Database Inconsistencies
Note: Before updating Magento Database, take backup of it for
security.
1
4. Causes with
Solutions
• The .htaccess file in Magento website includes rewrite rules so
website and links work perfectly.
• But, if the file got deleted or altered by the owners mistakenly
then the rules will not work and can generate 404 errors in
Magento admin login page.
Cause
• First of all, rename your file and check error is gone or not
• If issues are still noted, then correct the misconfiguration in the
.htaccess file.
• And, if .htaccess file is missing, create a new .htaccess file f and
upload it to the root folder.
Solution
Corrupted .htaccess File
2
5. Causes with
Solutions
Cause :
• The default Magento admin URL:
http://website.com/magento/admin
• But, store owners can modify it.
• But if you custom the admin URL
without setting the
custom_admin_url settings
properly, then you face the 404
error.
Solution :
• Check and fix the Magento admin
URL in the below fields of the
core_config_data table:
• admin/url/use_custom
• admin/url/custom
• web/secure/base_url
• web/unsecure/base_url
Admin URL Customization
3
6. Causes with
Solutions
If you skip clearing the cache
after performing security
patches, installing or
upgrading an extension,
then Magento admin panel
shows previous data.
Clear the Magento cache using
below the command line
php bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/generation/*
Magento Cache
Cause Solution
4
7. Causes with
Solutions
Sometimes during
fresh Magento
installation, the
hosting server doesn’t
support mod_rewrite
module, and it
generated a 404 error.
Check web server
configuration file to
verify that the
mod_rewrite module is
enabled on the server.
If it’s not enabled, then
enable it and restart
the web server.
mod_rewrite Disabled
Cause
Solution
5
8. Conclusion
Here We have discussed the top 5 reasons like a Database issue,
Cache issue etc. for 404 error in a Magento admin URL with the
proper solutions.
But if you feel that any solution is hard or it may damage your
website or its data, then you can contact any Magento Web
Development Services providers and ask them for the help.
Share, and like our presentation! And you can suggest or ask us in
comments.
9. Contact Us
Europe Office
Via San Felice 4340122
BolognaItaly.
Europemailinfo@aegissofttech.com
India Office
"Royal Square”,
1st Floor, Off No. 110,
Nr. Shilp Tower, Tagore Road,
Rajkot - 360 001, Gujarat -
Indiamailhs@aegissofttech.com