Magento Login Admin not work happen in many cases and this is a simple issue but it will take time if you don’t know how to fix it.

This article will show you all of cases we meet and update continually every time we have a new case.

Problem: Can’t access admin URL

After moving to a new hosting or after install a new extension with some new configuration or server changes. It can make your admin URL not work. It may show a blank page or simple show server error. Let’s check one of these solution

Solution 1: Check and make sure mode rewrite enabled, unless you will see the blank page. To check this mod_rewrite enabled or not, let’s call php function:

And then check the result to see mod_rewrite in “Loaded Modules” and try to enable it if not.

Solution 2: Maybe the caching is still there, so let’s clear all cache in folder “var/cache” or if you are using some special cache let’s check https://magento2x.com/clearflush-redis-cache-memcached-data/

Problem: Blank page after submit login information

This problem happen because the wrong URL/domain configuration in database. After moving to new domain or somehow database change to the wrong configuration. Let’s correct it.

Login to database phpmyadmin or any database tool to execute this SQL command

or simple delete all of them and magento will reconfiguration auto:

Now, let’s clear all cache files and try again.

After doing these steps but it still not work then let’s go with extra steps:

#1 Check cookie expiration

Having been set, the cookie’s instantly expiring. To check it start with the cookies your browser contains and if there’s one from Magento.

The local time could have been set incorrectly. You can check backend settings made by your admin users in Magento admin logs (when installed). This being so, the both timezones applied by Magento should be reviewed. The cookie specification can be set to expire in 10+ years.

#2 Shift to the localhost interface

Being set to run locally the Apache webserver may be accessed through the localhost (hostname). Thus, the cookie won’t be set due to security configs of the browser. Stop using localhost, but run the localhost interface instead. You need either to shift the base url_values in core_config_data table or to look at your interface configuration. Then delete your contents and reload the page.

#3 Prove the cookie domain matches the server’s

Go to the core_config_data table via the SQL command and renew it to a less secure -> empty string or a safer -> actual domain:

#4 Confirm ‘getBlockHtml’ is there

‘Formkeys’ or getBlockHtml is used for protecting Magento against XSS attacks. It’s saved in the session data and validated during the submission to the server.

If something is wrong about it the action won’t be completed.

#5 Review core file

Other team developers could have customized app\code\core\Mage\Core\Model\Session\Abstract\Varien.php:

Thus, bugs tracking and login work could have been affected.

References:

https://amasty.com/knowledge-base/magento-login-not-working-5-ways-to-decide-what-to-do-next

https://community.magento.com/t5/Installing-Magento-1-x/Can-t-login-into-admin-area/td-p/2196

https://www.simicart.com/blog/magento-admin-login-not-working/

https://www.yireo.com/tutorials/magento/magento-administration/651-unable-to-login-into-the-magento-backend

One thought on “Magento Login Admin not work – Solved!

Comments are closed.