By default, the “Remember Me” checkbox makes you get remembered for 14 days. This is filterable though.
add below code in your theme functions.php
where 31556926 = 1 year in seconds
This code will change that value:
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return 31556926; // 1 year in seconds
}
Related Posts:
- How to share cookies and sessions between domain and subdomain?
- Is it possible to transfer a WordPress session to a different browser via query string?
- Clearing cookie on logout and session expiration
- Deleting cookie to logout
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- Set Short Automatic Logout Time for One User
- How to change WordPress cookies to be session-only
- Correct user session/cookie handling with external site connection in wordpress
- Automatically Log Out UserX when visiting WooCommerceStore
- Looking to load a different template part on every load/refresh
- Capture and display users name
- WordPress keep logged in after browser close
- How do I expire a PHP session after 30 minutes?
- How reduce wordpress login session timeout time?
- Removing username from the ‘wordpress_logged_in’ cookie
- Destroy user sessions based on user ID
- Why does it say: ‘Cookies are blocked or not supported’?
- Place a cookie when a specific page has been viewed?
- Using wp_set_auth_cookie for custom user account system
- Should wordpress_logged_in cookie exist while logged out?
- Display message once per session to users with a specific role
- Worpdress PHPSESSID / EU law
- share login/logout sessions across two installs?
- Do I use cookies?
- How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?
- wp_logout action not working
- Hide/Show content based on cookie
- $_SESSION variables lost during OAuth callback
- ERROR: Cookies are blocked or not supported by your browser
- What is cookie “U” from domain “.adsymptotic.com” found on the WordPress page? [closed]
- How to fix samesite attribute in wordpress for chrome errors?
- how to logout user on browser tab or window closes
- Secure wordpress_logged_in cookie
- Custom Connect to Facebook, problem logging in/logging out
- Logout user and delete cookies from the client side?
- Random popup image per user with no repeat
- How to get session token of current user in wp_login hook?
- Unset a Cookie on Successful Gravity Forms form Submission [closed]
- How set a cookie from PHP and get it without refresh
- Why wordpress cookies name contains HASH
- Change the user is logged in cookie name
- can we share user login in 2 wordpress installs in 2 subdomains on one server? [duplicate]
- background/font size change and remember
- Modifying request $_COOKIE
- How to implement a $_SESSION alternative in WordPress inside a theme without a plugin?
- User Session and Stored Cookies not get removed
- Need help setting cookies with multiple value [closed]
- Session Experies and Get Logged Out Within Few Minutes
- How to store post ID’s in cookie or session to display the same posts later
- Check if user is logged in to site A when visiting site B
- How to setup cookie free domain for wp-includes?
- After logout browser’s back button into twenty sixteen theme profile
- COOKIE_ID with username appended
- iframe does not store session/cookie when refresh parent
- Setting Cookies For Form Autofill
- Disallow second login session
- Issues with set cookie
- Accept or deny cookies – how to?
- WordPress Post Voting – Vote once per IP on entire site
- $_SESSION variable not saving on page refresh or new page
- wordpress can’t read a cookie?
- Do I need a Cookie consent on a basic WordPress site?
- Page specific cookie
- Best method to show modal only once
- Cookie with referral URL [closed]
- One time login on 2 different WordPress sites
- Error when setting cookie
- How to keep a variable in COOKIE or GET query string?
- Add session or cookie to remember last menu location
- Codeless random token generation to pass into multiple tracking links in a single page load
- add class to element if user is not logged in [closed]
- Favicon not loading until cookies are accepted?
- Set cookie parameters on wp site – PHP not working?
- logout users with specific role after close browser tab
- can you help review CCCP (Conditional Cookie Content Post) and help to create a block?
- COOKIE_DOMAIN chaos
- Setup cookie on Chrome even without HTTPS
- Change auth_cookie_expiration for specific roles and specific login times
- How can I get an updated cookie in header.php?
- Setting a Custom Cookie in WordPress only for Logged In Customer/User (non-admin)
- How are sites using wordpress hiding wordpress cookies that have “wp” or “wordpress” in the cookie name?
- Login issue with subdomain installs
- Checking for cookies returns correct result only inside Elementor Editor
- Entirely Cookieless WordPress?
- Use WP user status (logged_in) to manage access to independent application
- is_user_logged_in() returns different values on different pages
- how to remember specific action/event for current user?
- Why deleting/removing cookies in WordPress does not log me out from admin?
- When ever wordpress home page refreshes the code is not reading the cookie as set anymore
- http_referrer issue when detecting where site comes from and allow if from allowed host
- detect referr page
- Allow user to select location and then set cookie for location in WordPress
- Cookie is not set
- Why isn’t my cookie setting in my function?
- Logged In cookie gets saved but not Auth cookie
- setcookie not working when defined with ‘/’ but working if not defined
- Why WordPress not logout after I have close my browser?
- How to use Cookie or Session php for one page and just a password
- How to get the id dynamically to store cookies
- how to manage Session in WordPress using custom login?