magento admin login not working

project run on server fine but locahost not working admin login Here

  • Did you change the base url of the site? Feb 3, 2017 at 7:50
  • web/unsecure/base_url web/secure/base_url change to Feb 3, 2017 at 7:54
  • front end is working ah?
    – SNS
    Feb 3, 2017 at 7:55
  • Try to navigate in your database and look for core_config_data table and change the base_url secure and unsecure change it to . Feb 3, 2017 at 7:58

4 Answers 4


This is a common problem in local server.

You can fix it by creating editing the hosts file (http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) to map a domain to

For example: local.mage.dev

After this you will need update your store URL in database, since your admin is not working.

To do this, run the following queries replacing the xxxxxxxxx by your store directory:

UPDATE core_config_data SET value = 'http://local.mage.dev/xxxxxxxxx/' WHERE path = 'web/unsecure/base_url';
UPDATE core_config_data SET value = 'http://local.mage.dev/xxxxxxxxx/' WHERE path = 'web/secure/base_url';
  • localhost local.mage.dev set hosts file and core_config_data ,web/secure/base_url local.mage.dev/directory but not working admin login / end of directory Feb 3, 2017 at 8:32
  • Try doing that in incognito mode or another browser.
    – versedi
    Feb 3, 2017 at 8:42

Try to login from Firefox. if you are using chrome, most of the time it won't let you in.


happens with me most of the time

Delete cookies always solve my problem.

if you want to delete only one cookie then you can delete adminhtml cookie from your browser

and login works


It has multiple reasons:

You need to check the Nginx hosts whether it's correct or not. because when PHP not getting the correct permissions it causes this problem.

You need to check the core_config_table to put your local host there.

If you use this command nginx -t it shows you the reasons why Nginx is not working correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.