What can be more annoying than logging repeatedly into phpmyadmin while you are working on a project. So in this post I am going to discuss how you can increase the logout time for phpmyadmin. The default session storage method is via cookies, hence we need to increase the logout time set inside the cookies. Well certainly, there is a much simple way to do that than to understand how it works. Let’s see what that way is –

The configuration is stored in the config file located at –


You need to change the following line of code. The default value is assigned as 1440, you can change it to 86400 (valid for 24hours).

 * validity of cookie login (in seconds; 1440 matches php.ini's
 * session.gc_maxlifetime)
 * @global integer $cfg['LoginCookieValidity']
$cfg['LoginCookieValidity'] = 86400;
//for me it was line no. 618

By setting the value of LoginCookieValidity we are actually asking the cookie to increase the session expire time. But this is valid as long as the cookies exist, if you are going to clear browser cache, then you will have to login once again to set the new cookie; apparently that’s how the cookies work.

In above example I have set the cookie value to 86400 which is value of one day in seconds, meaning the session will not expire for 24hours after the time you login. If you want to increase it to let’s say 30 days then simply change 86400 to 86400 * 30

I hope this will help.

Stay Digified!!
Sachin Khosla

Share this post: