Support » Fixing WordPress » “Remember Me” Login Sessions > How long do they last?

  • It’s very hard to find official WordPress documentation about how exactly the Remember Me feature works on the /wp-login.php page. I please have two questions:

    1. How long does the login session last with Remember Me checked on?
    2. How long does the login session last with Remember Me unchecked?

    Thanks for any help and any links to WordPress.(org|com) articles!

    • This topic was modified 2 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello You Wonderful You!,

    It’s very hard to find official WordPress documentation about how exactly the Remember Me feature works on the /wp-login.php page.

    I’m *NOT* a developer, but a quick call to Uncle Google has a bunch of links on the subject, the first of which has answers to your two questions above:

    wp_set_auth_cookie: Sets the authentication cookies based on user ID.

    wp_set_auth_cookie( int $user_id, bool $remember = false, bool|string $secure = '', string $token = '' )

    The $remember parameter increases the time that the cookie will be kept. The default the cookie is kept without remembering is two days. When $remember is set, the cookies will be kept for 14 days or two weeks.

    https://developer.wordpress.org/reference/functions/wp_set_auth_cookie/

    Of course, not being a developer myself, I might have completely misunderstood your question (as I often do around here 😀 )

    • This reply was modified 2 years, 4 months ago by George Appiah. Reason: Fixed a typo
    • This reply was modified 2 years, 4 months ago by George Appiah.
    Thread Starter wpealbert

    (@wpealbert)

    George! You are the coolest! Thanks so much for sharing that. Not sure what search terms I was using, but would always get plugins or stackoverflow links in the top results.

    I truly appreciate the info!

    Stay safe and six feet away, with hand sanitizer in your pocket!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Remember Me” Login Sessions > How long do they last?’ is closed to new replies.