Hello Magento geeks,
In the last tutorial, we have learned How to Restrict Other Countries for Shipping in Magento 2,
Today, I am back again with a new tutorial, and this time I will explain to you how you can resolve 404 error-page not found for admin in Magento 2.
Magento is one of the leading eCommerce platforms used by many businesses worldwide. And if you also have chosen Magento for your Business, then you are on the right path. If you are new or an experienced person who has been using Magento 2, then you would know that you have to perform lots of tasks from the admin panel.
After you have set up the new Magento 2 store, there are chances you might face the issue of admin 404 error, or after any security or any third-party extension can cause your admin login page inaccessible with 404 error page.
In this tutorial, I am going to explain how you can resolve the 404 error-page not found with all the possible solutions in Magento 2 admin. Below is the list of solutions you can apply to your Magento 2 store.
Contents
php bin/magento cache:clean rm -rf var/cache/* rm -rf var/generation/*
Or you can manually delete the cache and generate a folder inside a var folder from Cpanel.
sudo a2enmod rewrite
Configure apache.
For Ubuntu / Debian edit the file /etc/apache2/apache2.conf. To edit this file run command
sudo vi /etc/apache2/apache2.conf
Modify from:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
to
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Then restart apache
sudo service apache2 restart or sudo /etc/init.d/apache2 restart or sudo systemctl restart apache2
Then, if you’d like, you can use the following .htaccess file.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
Try uploading default .htaccess file in the root of your Magento installation.
Go to app/etc/env.php open that file
And look for the admin URL, code must be like below
You can see/change admin URL from @app/etc/env.php
return array ( 'backend' => array ( 'frontName' => 'admin_q76xvk', ),
The highlighted one is the admin URL. Make sure you are typing the correct admin URL.
During Setup you can replace the URL i.e., http://localhost/ with http://127.0.0.1/
Delete var/cache folder Go to database SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites' and make it 0 Then enter URL in your browser domain.com/index.php/adminurl
You don’t have to perform all of the solutions described in this list, but instead, try one by one and see what works for your store. And when you find the right solution for your store, then let us know in the comment section below.
If you have any other solution apart from this list, then also you can comment below and let us know so that we can update this tutorial blog for other readers.
So, today, we learned that how you can resolve the 404 error-page not found for admin in Magento 2. If you like what I am sharing, then give it a thumb-up and also share this with your Magento colleague and friends.
To learn more about Magento, I have exciting Magento tutorial series where I update regular blog articles, especially for readers like you, which you can check out at any time. And if you have anything in mind, and want me to write a blog on that too, then let me know in the comments below.
Lastly, if you need any help with your Magento store, then you can always contact our support center at any time, and we will be happy to help you ?
(1) How to redirect 404 error page in Magento 2?
Answer: To redirect a 404 error page, head to Marketing > Advanced SEO Suite > Redirects, and add a redirect to any error 404 page. You can redirect visitors to your home page, or, if you’re redirecting manually, to a relevant category page.
(2) What is admin 404 Not Found?
Answer: The 404 error is an HTTP response code that occurs when the server cannot find the file or page requested by the user.
(3) How do I find my Magento 2 admin URL?
Answer: Default Base URL: http://yourdomain.com/magento/ Default Admin URL and Path: http://yourdomain.com/magento/admin.
(4) How do I fix 404 error in Magento?
Answer: This issue should be resolved by logging out and logging in to the Magento Administration Panel again.
(5) What is 404 error access log?
Answer: A 404 error is defined as a missing file or resource. Looking at the request URI will tell you which one it is. You can then check your deployment to make sure a file hasn’t accidentally been deleted or removed.
Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…
MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…
In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…
Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…
The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…
Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…
View Comments
Thanks a lot Sir, Solution 2 - 2. Enable Rewrite mode, This solution worked for me and I am happy now!! Thank You once again , Awesome Tutorial.
I have upgraded magento from 2.3.6-p1 to 2.4.2, and then I started getting 404 error on all pages, either front end or backend, tried all options above, confirmed that mod_rewrite is enabled on my apache, url I am using with IP instead of localhost, made file permissions to 777 (for files and folders to overcome file permissions issue), cleared all cache and generated contents, recompiled and deployed but nothing helped.
Hi,
All the options or solutions mentioned in this page didnt work for me. I have installed Magento 2.4 using composer in ubuntu server. static content is loading fine but magento frontend or admin url is throwing 404 error: page not found. could you please help me.
Did you follow all the steps to install the Magento on Ubuntu server?
Please confirm the file permissions.