Magento Tutorials

Magento Admin Login Not Working Issue

magento-admin-login-not-working

Cannot login to your Magento backend?

Magento admin login not working: Although you have entered the correct username and password, you still cannot access your Magento backend. You are redirected to the same login page. Nothing happened. How to resolve this issue? Here are some tips which may help you.

The reason might be that you’re accessing the Magento website through the hostname localhost. Magento checks whether the hostname is a real domain name, and if it isn’t, it fails to create the right cookies.

    • Under Linux or MacOS you could try using localhost.localdomain.

 

  • Under Windows you have to modify your hosts file for this. Easier is just to use the IP-address 127.0.0.1 to access Magento.

If the solution above doesn’t work, follow the steps below:

    1. Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

 

  1. Find the code:
session_set_cookie_params(

$this->getCookie()->getLifetime(),

$this->getCookie()->getPath(),

$this->getCookie()->getDomain(),

$this->getCookie()->isSecure(),

$this->getCookie()->getHttponly()

);

and replace it into this one:

session_set_cookie_params(

$this->getCookie()->getLifetime(),

$this->getCookie()->getPath()

//$this->getCookie()->getDomain(),

//$this->getCookie()->isSecure(),

//$this->getCookie()->getHttponly()

);
  1. Save the file. And try to login to your admin again.

 

Recommended posts:
Magento Maintenance Mode
Magento 2 “Invalid Form Key”

SEE MORE:

0 Comments

Dom

A knowledge craver who always strive to be wiser everyday.

    avatar
      Subscribe  
    Notify of