wpgenie

increse duration of login cookie for WordPress

Apr 29th, 2025 (edited)
707
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.16 KB | None | 0 0
  1. /* goes to child theme functions.php file */
  2.  
  3. // stay logged in for 1 year (31536000 seconds)
  4. add_filter('auth_cookie_expiration', fn() :int => 31536000);
  5.  
  6.  
  7.  
  8.  
Add Comment
Please, Sign In to add comment