I am just new in magento. I have installed magento on my localhost. After installing I have tried to login as admin, But I can't be able to login. I have tried in different browsers, But all browsers are redirecting to the login page itself. I have tried the solution given in this question. But it was producing error.

Please any one help me to solve this issue.

  • Better to set up a virtual host in your local environment than run under localhost. Commented Oct 13, 2014 at 15:47
  • @JonathanHussey do you have any Idea why this is not logging in.
    – James
    Commented Oct 13, 2014 at 16:24
  • Magento has logic built in to not log you in if running under localhost. Don't ask me why it was added in, but you really need to be running under a proper domain. Commented Oct 13, 2014 at 16:26

1 Answer 1


I'm writing this answer to help those who are facing the same problem.

As JonathanHussey suggested in the comment. I have created a virtual host in my system. And reinstalled the Magento. After completion of installation, when I tried to login everything is working fine.

I think this was the best solution for this problem, rather than editing the Magento core.

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.