Have "Remember Me" checked by default on the login page and configure how long a login is remembered. Or disable the feature altogether.
Take control of the “Remember Me” login feature for WordPress by having it enabled by default, customize how long users are remembered, or disable this built-in feature by default.
For those unfamiliar, “Remember Me” is a checkbox present when logging into WordPress. If checked, WordPress will remember the login session for 14 days. If unchecked, the login session will be remembered for only 2 days. Once a login session expires, WordPress will require you to log in again if you wish to continue using the admin section of the site.
This plugin provides three primary controls over the behavior of the “Remember Me” feature:
NOTE: WordPress remembers who you are based on cookies stored in your web browser. If you use a different web browser, clear your cookies, use a browser on a different machine, or uninstall/reinstall (and possibly even just restarting) your browser then you will have to log in again since WordPress will not be able to locate the cookies needed to identify you.
Other than the plugins listed below, compatibility has not been tested or attempted for any other third-party plugins that provide their own login widgets or login handling.
Special handling has been added to provide compatibility with the following plugins:
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
/wp-content/plugins/
).By default, if you log in without “Remember Me” checked, WordPress keeps you logged in for up to 2 days. If you check “Remember Me” (without this plugin active), WordPress keeps you logged in for up to 14 days.
WordPress remembers who you are based on cookies stored in your web browser. If you use a different web browser, clear your cookies, use a browser on a different machine, the site owner invalidates all existing login sessions, or you uninstall/reinstall (and possibly even just restart) your browser then you will have to log in again since WordPress will not be able to locate the cookies needed to identify you.
Also, if you changed the remember me duration but hadn’t logged out after having done so, that particular login session would still be affected by the default (or previously configured) duration.
You can’t (and probably shouldn’t). With a session length of less than an hour you risk timing out users too quickly.
No. The duration for which a login cookie is valid is defined within the cookie when it gets created (which is when you log in). Changing the setting for the remember me duration will only affect cookies created thereafter. You can log out and then log back in if you want the newly configured remember me duration to apply to your session. More precisely, the changes take effect for all new logins, which can happen after a preexisting login session expires, the user logs out, or the user’s cookies are cleared in their browser (manually or automatically).
Certain settings being enabled may disable other settings that get superceded by the enabled setting. For instance, if the “Never remember?” setting is enabled, then all other settings are disabled since they wouldn’t apply. The onscreen help text for each setting indicates what other settings are relatedly affected.
As explained in the previous FAQ entry, changes to the plugin’s settings only take effect the next time a user logs in. Existing login sessions will abide by the remember me duration configured at the time they logged into their current session.
The login cookies for a user session can become invalidated by the visitor by logging out or clearing their cookies.
Here are some options to force all active login sessions to abide by the current login session duration:
* Manually refresh your site’s authentication keys and salts.
* Use WP-CLI to regenerate salts.
* Use the plugin WPForce Logout (to force session logouts) or Salt Shaker (to regenerate salts). Note: Plugins are merely suggestions and not necessarily recommendations.
Special handling has been added to provide compatibility with the following plugins:
Yes. This plugin does not collect, store, or disseminate any information from any users or site visitors.
Yes.
Highlights:
This is minor bugfix release fixes the plugin settings page’s info banner that reports the current remembered session duration. When the WordPress default remembered session duration (of “14 days”) is applicable, that value is now shown instead of stating an incorrect value (“2 days”). Actual session durations and plugin functionality were not affected.
Details:
get_default_remembered_login_duration()
get_login_session_duration()
to indicate if the default duration should be the default remembered duration or notHighlights:
This is a recommended and notable release that improves the labeling, help text, data display, and functionality of the plugin’s settings page; restructures the unit tests; verifies compatibility through WordPress 6.2+; and other minor behind-the-scenes tweaks.
Details:
type
attribute to script
and style
tags'admin_enqueue_scripts'
action instead of during 'init'
is_plugin_admin_page()
in help_tabs()
instead of reproducing its functionalityis_plugin_admin_page()
is used before 'admin_init'
action is firedis_plugin_admin_page()
to use get_current_screen()
when availablestyle
tagc2c_{PluginName}_Plugin_051
to c2c_Plugin_060
get_c2c_string()
as a getter for translated stringsget_c2c_string()
whitelist_options()
to allowed_options()
add_allowed_options()
instead of deprecated add_option_whitelist()
for WP 5.5+allowed_options
filter instead of deprecated whitelist_options
for WP 5.5+is_wp_version_cmp()
and get_c2c_string()
)is_wp_version_cmp()
as a utility to compare current WP version against a given WP versioncontextual_help()
to be easier to read, and correct function docblocksbin/
into tests/
tests/bootstrap.php
into tests/phpunit/
tests/test-*.php
into tests/phpunit/tests/
phpunit.xml
to phpunit.xml.dist
per best practicesFull changelog is available in CHANGELOG.md.