I worked long on this one. It is because of the WordPress remember me. Use this code in your theme’s functions.php
and it should fix your issue:
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : 180;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
Related Posts:
- How reduce wordpress login session timeout time?
- Custom Connect to Facebook, problem logging in/logging out
- Session Experies and Get Logged Out Within Few Minutes
- Preventing session timeout
- Removing username from the ‘wordpress_logged_in’ cookie
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to pass users back and forth using session data?
- How to fake a WordPress login?
- Does wp_logout_url() destroy a session? (Logging out question)
- share login/logout sessions across two installs?
- How can I test the login for an expired session?
- How do I extend auto logout on idle OR redirect inline popup
- How long do users stay logged in if they DON’T check remember me?
- How to get login data (session) outside WordPress?
- How can I test the login for an expired session?
- How does WordPress handle sessions?
- Preexisting login to change to logout link in sub menu
- WordPress as webapp login session
- Share WordPress login info with other PHP app
- WordPress error on log out ‘Not Permitted’ and can’t log out
- Add logout link when logged in, make it disappear when logged out?
- Lock out all WordPress Administrators except two specific users
- How to remove ‘wordpress…’ text from page titles in tabs
- One time login on 2 different WordPress sites
- add class to element if user is not logged in [closed]
- End session screen not close automatically after login
- Problem with is_user_logged_in() function in some pages
- wordpress login loop and session problem
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- Why deleting/removing cookies in WordPress does not log me out from admin?
- User not logged first time I open the homepage
- wp_logout logging everyone out instead of just the user that clicked the logout link!
- How to limit user to login only once per session
- how to manage Session in WordPress using custom login?
- Inconsistent login state
- Can i hide a dynamically created div to logged out users?
- In Django, how do I know the currently logged-in user?
- Can I programmatically login a user without a password?
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- Is there any way to rename or hide wp-login.php?
- How to login with email only no username?
- How can I redirect user after entering wrong password?
- Increase of failed login attempts, brute force attacks? [closed]
- Login page ERROR: Cookies are blocked due to unexpected output
- Separate registration and login for different roles
- SSO / authentication integration with external ‘directory service’
- How to prefill WordPress registration with social details
- Check for correct username on custom login form
- Disallow user from editing their own profile information
- I can’t access my site via wp-admin
- ‘Password field is empty’ error when using autofill in Chrome
- How to show ‘login error’ and ‘lost password’ on my template page?
- What is $interim_login?
- Custom login form
- How to prefill the username/password fields on the login page
- wp_signon returns user, but the user is not logged in
- Adding extra authentication field in login page
- Destroy user sessions based on user ID
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
- wp_signon() does not authenticate user guidance needed
- What exactly is ReAuth?
- What are the differences between wp_users and wp_usermeta tables?
- Login members using web services
- Make my wordpress blog remember my login “forever”
- How to check in timber if user is loggedin?
- How do I change the language of only the login page?
- How to change the default logout link on WordPress Admin
- Stop WordPress from logging me out (need to keep me logged in)
- Woocommerce registration page [closed]
- How to disable autocomplete on the wp-login.php page
- Share login data/cookies between multiple installations
- Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
- How do I change the logo on the login page?
- Allow up to 5 Concurrent Login Sessions
- Why does WordPress hide the reset password key from the URL?
- Is it possible to sign in with user_email in WordPress?
- How to use current_user_can()?
- Avoid to load default WP styles in login screen
- WordPress registration message
- how to display the wordpress login and register forms on a page?
- How can I send a welcome email to a user AFTER they login for the first time?
- Can not login with correct username and password
- Website Visible only to Registered users
- How can i increase the login expiration length?
- How do I use add_action from a class method?
- How to remove the WordPress logo from login and register page?
- How can I add a custom script to footer of login page?
- Brute force attack?
- Customize wp_new_user_notification_email()
- Need to execute a cron job
- Masking logout URL
- Login email after registration never sent or received
- How can I create a separate blog that is private?
- How to keep always logged in development environment
- Add Confirm Password field in wp-login.php Password Reset page
- handling login/logout redirects
- Integrate recaptcha and wp_signon – what is needed?
- Stop users from logging in from multiple locations
- Clearing cookie on logout and session expiration