{"id":261,"date":"2018-12-10T11:26:22","date_gmt":"2018-12-10T11:26:22","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2018\/12\/10\/magento-2-backend-not-working-solution\/"},"modified":"2025-09-01T11:06:57","modified_gmt":"2025-09-01T05:36:57","slug":"magento-2-backend-not-working-solution","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/magento-2-backend-not-working-solution\/","title":{"rendered":"Simplified Solution to Magento 2 Backend Not Working"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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&nbsp;<em>Magento 2 admin panel doesn\u2019t work<\/em>!&nbsp;?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The backend administration not working is a common issue faced by admins. However, not common enough to be ignored! Here, I\u2019ll discuss some of th common issues and their solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Possible Issues:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. The result of installing or updating<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:clean \nrm -rf var\/cache\/* \nrm -rf var\/generation\/* \nrm -rf generated\/* (for magento 2.2.x)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The compilation hasn\u2019t been started.<\/strong>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\u2019t work :(The&nbsp;<em><strong>solution is to reset the production mode again via the command line.&nbsp;<\/strong><\/em>Run the below command to check if the production mode is activated:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento deploy:mode:show<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the current application mode is production, run<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>php bin\/magento deploy:mode:set production<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to set the mode once again and reset everything from the start.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>An incorrect Admin URL<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/12\/meetanshi-image-admin-url.png\" alt=\"meetanshi-image-admin-url\" class=\"wp-image-3899\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento info:adminuri\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2<strong>. The permission role is not set correctly<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To solve this issue, reset the permission role of your administrator from&nbsp;<strong><strong>Admin Panel&gt; Systems&gt; Permission&gt; User Roles.<\/strong><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/12\/1_permission-role-1024x319.png\" alt=\"1_permission role\" class=\"wp-image-3900\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Follow the below steps:\n<ul class=\"wp-block-list\">\n<li>Select the role name that needs to be edited.<\/li>\n\n\n\n<li>Switch to the <strong>\u2018Role Resources\u2019<\/strong>&nbsp;menu.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/12\/2_Role-Resources-1024x362.png\" alt=\"2_Role Resources\" class=\"wp-image-3901\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the role and clear Magento 2 cache after the settings are configured.   <\/li>\n\n\n\n<li>Set the <strong>\u2018Resource Access\u2019<\/strong>&nbsp;to <strong>\u2018All\u2019.<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Backend not working when you&nbsp;upgrade&nbsp;or&nbsp;migrate your Magento<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this case, the \u2018<strong>Not Found<\/strong>\u2019 message is displayed on the frontend when you try to access a page.<br>One quick solution to the&nbsp;<em>Magento 2 Backend not working&nbsp;<\/em>is to run the below SQL query:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SET FOREIGN_KEY_CHECKS=0;\nUPDATE `store` SET store_id = 0 WHERE code='admin';\nUPDATE `store_group` SET group_id = 0 WHERE name='Default';\nUPDATE `store_website` SET website_id = 0 WHERE code='admin';\nUPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';\nSET FOREIGN_KEY_CHECKS=1;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After reading this post, you\u2019ll never get stuck with the problematic admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check out our<a href=\"https:\/\/meetanshi.com\/magento-upgrade-service.html\"> Magento 2 upgrade<\/a> and <a href=\"https:\/\/meetanshi.com\/magento-2-migration-service.html\">migration service<\/a> for a smooth store transition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Happy Administrating!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":21290,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions\/21290"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}