Increasing logged-in expiry time of your wordpress website

Increasing logged-in expiry time of your wordpress website

Sometimes while you are working on your project, you dont want wordpress to log you off from the website you are working on or in some other scenario, you might need to set a timer for your website’s login period for security purpose. Here’s a little piece of code that you can copy and paste into your functions.php file.

add_filter( 'auth_cookie_expiration', 'loggedin_for_10days' ); 

function loggedin_for_10days( $expire )
{
  return 864000; // 10 days in seconds 
}

Comments

Share

I am a web developer based in Lahore. I spend my days playing with wordpress, code igniter, wide variety of key web projects and frameworks.

Comments

  1. I don’t leave loads of comments on plenty of blogs but i felt i had to here.
    Quality articles you have here.

Leave a Reply

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

11 − eight =

Translate »