🔥 Just Launched! Werra Premium Template for HyväSee it in Action

Simplified Solution to Magento 2 Backend Not Working

By Sanjay JethvaUpdated on Apr 16, 2025 3 min read

Magento 2 Admin is far better than Magento 1 with a better layout and organized user interface. However, there are possibilities of some issues due to which Magento 2 admin panel doesn’t work! ?

The backend administration not working is a common issue faced by admins. However, not common enough to be ignored! Here, I’ll discuss some of th common issues and their solution.

Possible Issues:

1. The result of installing or updating

You may get an error message after installing a new extension, upgrading one or applying Magento 2 core or an extension patch. The solution is to flush the Magento 2 cache via the command line. Run the below commands for the solution:

php bin/magento cache:clean 
rm -rf var/cache/* 
rm -rf var/generation/* 
rm -rf generated/* (for magento 2.2.x)
  • The compilation hasn’t been started.It is necessary to restart the compilation when a new extension is installed in a production mode. If you forget it, the backend as well as frontend won’t work :(The solution is to reset the production mode again via the command line. Run the below command to check if the production mode is activated:
php bin/magento deploy:mode:show

If the current application mode is production, run

php bin/magento deploy:mode:set production

to set the mode once again and reset everything from the start.

  • An incorrect Admin URL

It may happen that you are trying to access the backend with incorrect URL. Check the correct URL for admin panel via command line with the below command.

meetanshi-image-admin-url
php bin/magento info:adminuri

2. The permission role is not set correctly

To solve this issue, reset the permission role of your administrator from Admin Panel> Systems> Permission> User Roles.

1_permission role
  • Follow the below steps:
    • Select the role name that needs to be edited.
    • Switch to the ‘Role Resources’ menu.
2_Role Resources
  • Save the role and clear Magento 2 cache after the settings are configured.
  • Set the ‘Resource Access’ to ‘All’.

3. Backend not working when you upgrade or migrate your Magento

In this case, the ‘Not Found’ message is displayed on the frontend when you try to access a page.
One quick solution to the Magento 2 Backend not working is to run the below SQL query:

SET FOREIGN_KEY_CHECKS=0;
UPDATE `store` SET store_id = 0 WHERE code='admin';
UPDATE `store_group` SET group_id = 0 WHERE name='Default';
UPDATE `store_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 reading this post, you’ll never get stuck with the problematic admin panel.

Check out our Magento 2 upgrade and migration service for a smooth store transition.

Happy Administrating!

Thank you

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.