The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

Magento 2 404 Error Page Not Found in Admin

After installing Magento 2 Extensions, you may get the Magento 2 404 Error Page Not Found error in admin’s pages. No worries, that is because of the permission in your current session. Let’s follow this guide, we will show you 4 reasons why it occurs, either due to Magento 2 installation, extension upgrade, the 403 Forbidden error, or messy page; as well as solutions on how to resolve 404 Error Page Not Found step by step.

Related Topics:

4 problems why Magento 2 404 Error Page Not Found in Admin

Here are 4 reasons why you get a 404 Error Page Not Found in the backend and guidance on how to solve them. Please, follow the steps to learn how to deal with the issue of each case.

Problem 1: After installing/upgrading

You may get the error in cases of:

  • After installing a new extension
  • After upgrading extensions
  • After applying patches of Magento core or extensions.


Flush Magento Cache with command line:

php bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/generation/*

Read How to flush Magento 2 cache for more details.

  • Flush cache in Admin: Admin > Systems > Cache Management
  • Log out then login again

Case: 404 Error Page not found error on extension admin route update Installing SUPEE - 6788

Try to contact the extension provider for more details.

Problem 2: Fresh Install On Ubuntu/Centos/Debian

Description: After installation on Ubuntu/Centos/Debian, this error may be shown like this:

magento 2 404 error after install


It’s because your server does not enable rewrite mode.


  1. Enable Rewrite mode
sudo a2enmod rewrite
  1. Configure apache

For Ubuntu / Debian edit the file /etc/apache2/apache2.conf. To edit this file, you can run command

sudo vi /etc/apache2/apache2.conf 

Modify from:

<Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted


<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

Then restart apache

sudo service apache2 restart


sudo /etc/init.d/apache2 restart
  1. If the admin still displays a 404 error, take the following steps:

a, Place the .htaccess file from the root of Magento 2

b, Execute the following commands:

  • php bin/magento setup:upgrade
  • php bin/magento setup:static-content:deploy
  • rm -rf var/cache/*
  • rm -rf var/generation/*

Problem 3: Page 403 Forbidden errors

If you are experencing with 403 Forbidden errors while accessing to Magento store, you should update Apache configuration to allow visitors access to your site.


  • Open apache2.conf file
  • For Ubuntu, the file /etc/apache2/apache2.conf. To edit this file run command
sudo vi /etc/apache2/apache2.conf 

Update like this:

<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride All
	Order allow,deny
	Allow from all

Problem 4: Messy page, no style

As shown in the below image, a messy frontend may occur, leading to the 404 error in the backend.

Messy page, no style


There are 2 cases:

  • You server does not enable rewrite mode, try this solution
  • Deploy static content: follow the below solution.


It is because the static content is not generated to the pub/ folder. Let’s run this command to deploy it. Please try to run the following command:

php bin/magento setup:static-content:deploy

Problem 5: A change starting from Magento 2.4.2


This fix is for people using Magento version 2.4.2 and newer. If you see a 404 error after installing Magento 2.4.2, it’s because of a change in Magento 2.4.2.


You need to set the webroot to /pub/ to enhance security. To solve this, follow Magento’s official guide. It includes steps like changing server settings, updating the base URL, changing the env.php file, and switching modes.

The bottom line

These are 4 main causes and solutions for the 404 error Page Not Found in Magento 2. It is an annoying but quite common error, so as long as you are well aware of the reason, you can quickly fix the problem. If you find any other problem or want to discuss further, feel free to write in the comment box.

What about Magento 2 backend not working error?


What does admin 404 Not Found mean?

The 404 error is an HTTP response code indicating that the server cannot locate the requested file or page.

How can I redirect a 404 error page in Magento 2?

To redirect a 404 error page, navigate to Marketing > Advanced SEO Suite > Redirects, and insert a redirect for any 404 error page. You have the option to redirect visitors to your homepage or, if manually redirecting, to a pertinent category page.

What does a 404 error access log mean?

A 404 error denotes a missing file or resource. Examining the request URI will identify the missing item. Verify your deployment to ensure no files have been unintentionally deleted or removed.

Image Description
Hello, I'm the Chief Technology Officer of Mageplaza, and I am thrilled to share my story with you. My deep love and passion for technology have fueled my journey as a professional coder and an ultra-marathon runner. Over the past decade, I have accumulated extensive experience and honed my expertise in PHP development.

Looking for
Customization & Development Services?

8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.

Get free consultant
development service

    Explore Our Products:

    People also searched for


    Stay in the know

    Get special offers on the latest news from Mageplaza.

    Earn $10 in reward now!

    Earn $10 in reward now!

    go up