Skip to content

How To Set Remember Me Option To Be Always Checked In WordPress Login

If you check “Remember Me” checkbox every time you login, you will have 14 days of cookie expiry days. So, your browser will remember you for 14 days and will directly allow you to log into your WordPress admin panel until you opt to manually log out. Otherwise, your browser will only remember you for 2 days and it will kick you out of your WordPress after 48 hours.

If you always forget to check the Remember Me option every time you login, you can set remember me option to be always checked by using this trick.

Add following snippet to your current theme’s functions.php file:

add_filter( 'login_footer', 'always_checked_rememberme' );
function always_checked_rememberme() {
    echo "<script>document.getElementById('rememberme').checked = true;</script>";
}

Leave a Reply

Your email address will not be published. Required fields are marked *