• My admin login is staying active – probably for the default 7 days – but I cannot see how to change the cookie expiry time. I have Password Protect WordPress Lite installed for aa protected page and that works fine.

    How do I apply that to the admin login password or do I need another plugin?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there,

    To adjust the cookie expiry time for the admin login in WordPress, add a line of code to the wp-config.php file to modify the cookie expiry time. Locate the file in your WordPress installation directory and add the following line:

      define('LOGGED_IN_COOKIE', 'wordpress_logged_in_'.COOKIEHASH.'=your_custom_expiry_time');

      Replace your_custom_expiry_time with the desired time in seconds.

      Give it a try, and let me know how that goes! 😄

      Thread Starter rynd2it

      (@rynd2it)

      I copied the line into wp-config and changed the value to 2

      I then could not login at all _ I got a 500 error, I have an image of the file but I can’t save it here

      Thread Starter rynd2it

      (@rynd2it)

      Hello,

      Your solution did not work, please re-examine the problem

      Faisal Ahammad

      (@faisalahammad)

      Hey,

      If the above code doesn’t work, you can contact your hosting support so they can help you resolve the issue. Thank you.

      Thread Starter rynd2it

      (@rynd2it)

      This is NOT a hosting issue, if you can’t correct your invalid code then find me someone who can.

    Viewing 5 replies - 1 through 5 (of 5 total)
    • You must be logged in to reply to this topic.