Free Business Consulting

Can’t login into admin panel of Magento [SOLVED]

adminMagentoPHP1 Comments

If you Can’t login into the admin panel of Magento, Check the solution given below.

Manier times it happens that Magento admin doesn’t allow you to login after installation.

After long time searching and research in Magento, we found the solution. Today We will explain you about the problem and the solution.

First of all, what is Magento?

Magento is one of the Opensource for E-commerce Websites. It is a top-level open source in E-commerce category.

Now time to explain the problem and the solution of the problem.


While installing Magento on xampp version 2.5 you have provided admin username and password. After installation finished you no longer login with your admin account.

In fact, in the “Log in to Admin Panel” window whenever you provide wrong password/username combination it displays “Invalid Username or Password.” But whenever you provide correct password it does not show anything.

Though a new URL like is displayed on the address bar.Everytime you do this you can’t log in to the admin panel.

Reason of the problem

Do you know why this problem occurs? The problem occurs because magneto could not store cookies. We run it as localhost and localhost is not true domain but to store cookies we need a domain. That’s why login stops without saying any word.

Now the time comes for solutions. There are two solutions to this problem which are shown below:


First Solution

In different forums, I saw they mentioned connecting as http://localhost/magento/index.php/admin will fail but if you connect as it will work. But in my case IP address in the URL did not work too.

I made it work into whenever I changed my browser. Suppose I installed Magento using google chrome browser and I open admin URL into my firefox window and it worked. Though in the firefox the URL http://localhost/magento/index.php/admin did not work, but URL worked fine.

Second Solution

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

Find the code:

and replace with

After this save the file. And try to login into the admin.

I think it will work now.

If you like this post or if you have any query or question then feel free to comment.

Want help in Magento Web Development? Hire Us.

Hire Magento Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Get News In Your Inbox

Popular Blogs

How to create callback functions for jQuery plugins & extensions?

Most of the time custom jQuery plugins and extensions that we create do not use callback functions. They usually simply work on DOM elements or do some calculations. But there…

Continue Reading
Top 5 Best Ecommerce plugins in WordPress

Nowadays online shopping has increased and become very convenient shopping place for users, you may be wanting to start your own online shop so you can unleash your products to…

Continue Reading
10 Best WordPress Live Chat Plugins for Customer Support

The Live chat is the common thing now days, if you own any eCommerce website or if you are the service provider. It makes easy for your customers to contact…

Continue Reading
Free plagiarism checker sites

Plagiarism is the process of taking someone’s ideas & work and passing them off as one’s own. Prevent Plagiarism to check originality of content is the most important factor for…

Continue Reading
How to show wordpress posts in other CMS?

Currently since from few weeks, I am working on Expression Engine. Now you thought that what is Expression Engine. Now let me explain you in little brief. Expression Engine is…

Continue Reading

Remarkable Facts About Us

0 %
Client satisfaction
0 +
Years of Experience
0 +
Happy Clients
Projects Accomplished

Ready to Get Started ?