Problem:
I moved my Joomla installation from one server to another and now I am unable to login to the admin panel. This case can also happen while moving from one online server to my local machine or moving from local machine to online server.
When I go to the administrator login page: http://example.com/administrator/index.php , I can enter the admin username and password. However, I am not taken to the admin page. I get redirected to the same login page and without any error message. I know that I have entered the correct username and password.
Solution:
This is generally caused by incorrect configuration settings. The configuration settings are present in a configuration.php file present in your Joomla installation folder.
In my case, the cause was the cookie related settings.
Here are the changed that I made. I just set the cookie domain and cookie path to be empty.
//public $cookie_domain = ‘localhost/joomla’;
public $cookie_domain = ”;//public $cookie_path = ‘/’;
public $cookie_path = ”;
Now, I am able to login to the Joomla admin.
Hope this helps. Thanks.