WP Cookie Logout TIme

add_filter( ‘auth_cookie_expiration’, ‘keep_me_logged_in_for_1_week’ );
function keep_me_logged_in_for_1_week( $expirein ) {
return WEEK_IN_SECONDS; // 1 week in seconds
}

Add that to functions.php (child theme or code plugin). Can replace week with year or month.