How to Extend login session times to a Month

By default the login cookie lasts for

  • 14 days if you tick ‘remember me’
  • 48 hours if you don’t

So as a short term fix you probably want to tick ‘remember me’, and to extend that to 30 days you can add an auth_cookie_expiration filter e.g.

function auth_cookie_expiration_30_days( $seconds, $user_id, $remember_me ) {
    if ( $remember_me ) {
        return 30 * DAY_IN_SECONDS;
    }
    
    return $seconds;
}
add_filter( 'auth_cookie_expiration', 'auth_cookie_expiration_30_days', 10, 3 );

As you can see you can set per-user-ID durations and you can change the don’t-remember-me time here too if you want, although above I’m leaving that as the default.