Magento – Can’t login to admin after fresh installation

When i started learning Magento , my first step was installation of magento on my localhost ! I just began installation like WordPress & at that time i didnt aware it was much harder than wordpress installation , specially on localhost using Wamp server ! Sometimes on localhost after fresh magento installation you get the problem to not able to login in admin panel (backend) , whether your username & password are right.

You can solve this problem using following method.

Go to :-


Find the code given below around 77 line :-

// session cookie params
 $cookieParams = array(</strong>
 'lifetime' =&gt; $cookie-&gt;getLifetime(),
 'path' =&gt; $cookie-&gt;getPath(),
 'domain' =&gt; $cookie-&gt;getConfigDomain(),
 'secure' =&gt; $cookie-&gt;isSecure(),
 'httponly' =&gt; $cookie-&gt;getHttponly()

Comment above code , Done.

Refresh & try to login again..

The real problem is that when a Magento instance is running through a localhost and tries to create a cookie, but fails to do so because it requires a domain and localhost is not a true domain..

Leave a comment , if it is useful to solve your problem !!


2 thoughts on “Magento – Can’t login to admin after fresh installation

I like to hear from you about this !!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.