By default, WordPress makes your login session cookie expire in 48 hours (or on browser close), or 14 days if you check the “Remember Me” box.
Maybe you have some plugins which force your login cookie to expire.
You could manually add the code below on your functions.php
to extend your cookie expiry to whatever timeframe you like. You can, in essence, stop WordPress from ever logging you out by changing the number of seconds to be a much higher number.
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return YEAR_IN_SECONDS; // 1 year in seconds
}
Or you can also use this plugin to change the time limit: Configure Login Timeout
Hope that helps!!
Related Posts:
- How reduce wordpress login session timeout time?
- 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)
- How can I test the login for an expired session?
- How do I extend auto logout on idle OR redirect inline popup
- How to get login data (session) outside WordPress?
- how to logout user on browser tab or window closes
- Custom Connect to Facebook, problem logging in/logging out
- How can I test the login for an expired session?
- How does WordPress handle sessions?
- WordPress as webapp login session
- Session Experies and Get Logged Out Within Few Minutes
- Share WordPress login info with other PHP app
- One time login on 2 different WordPress sites
- End session screen not close automatically after login
- wordpress login loop and session problem
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- User not logged first time I open the homepage
- How to limit user to login only once per session
- SSO / authentication integration with external ‘directory service’
- Disallow user from editing their own profile information
- wp_signon returns user, but the user is not logged in
- What exactly is ReAuth?
- What are the differences between wp_users and wp_usermeta tables?
- 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
- How to remove the WordPress logo from login and register page?
- Stop users from logging in from multiple locations
- My login form does not work
- Cookie settings for session across WPML subdomains using custom AJAX login
- Is there a way to remove wp-login.php alias (login)?
- Login with cookie but without using WordPress code
- wp-admin redirecting to wp-login.php
- Get wordpress stored cookies for custom login
- Restrict PDF links
- Remote REST request to check login status
- Force user to login in home page
- Show menu item only if user is logged In (not word press login)
- Login as a client no dashboard menu?
- Allow access to a page for admins only
- Right practice to edit WP reset password email
- deny IPs from wp-login using .htaccess
- How To Change Wp Register/Login URL Permanently To My Custom Page
- How can I prevent my custom form from redirecting to wp-login?
- Custom Login iframe doesn’t work
- wp-admin returns 404 [closed]
- What would be the best way to implement Magic Link logins in WordPress?
- Can’t login to WordPress without hitting the Remember Me checkbox. Potential SSL implementation bi-product
- disable site_url redirect in wp-login.php
- Forgot password needs to redirect from wp-login to a custom page
- Is it possible to designate the login.php as homepage?
- Force login for a subdirectory within wordpress install
- Redirect login page except on reset pass
- Redirect users after failed login attempt?
- How to secure files based on format and word in file name with wp-config or htaccess?
- Redirect to custom variable
- Single sign on with custom site
- By registering always make uppercase the first letter of the login
- Best option to implement external register/login to WP from self-made API
- Enqueue new login style sheet
- WordPress Conditional Login Links
- Do more action after login successfully
- Can’t login to my own website
- I cannot login and am getting this error message. .
- Cannot log into migrated site
- WordPress SSL not working [closed]
- I want login using email not username wordpress front end
- How to Remove default “Login” link
- How to unpublish my new site while working on it?
- How to force “remember me” users to login again?
- Reset Password Limit not working
- User not able to sign in after wp_authenticate() and wp_signon() wordpress
- WordPress site login Redirect
- Thank You Page Layout Differs on User Logged In Status
- On Homepage “is_user_logged_in()” function is not working after login and it is working after refresh the page?
- Problem in auto login after registration
- Cant reset password my wordpress password not even with phpMyAdmin
- wp-cron event doesn’t run when custom login API is enabled
- Does it make sense to check a nonce on user log in?
- Special link for no automatic login (no username and no password)
- WordPress Auto Login From Email Link
- Building a custom login form – encountering issues
- Making sure two different wordpress website has auto login
- Site login failed due to strange warning
- How do i Redirect specific user(WooCommerce Sign-in not wordpress admin page sign-in) to specific page
- Chosen user password in registration is not being accepted on Login
- Add a required field to Registration
- loging to Admin page not working at all
- Can’t login through wp-login.php on fresh installation
- WordPress Cookies – wp_set_auth_cookie
- Authenticate return value
- Front-end login problem: requires re-authorization when accessing dashboard
- When trying to login if already logged in, form just shakes – error message remains empty
- Handle POST request sent from an external site for login?
- Unable to login after adding ReCaptacha without API key
- How to create an alternative login page that does not use any plugins?
- Login and register by API