Title: Login Timeout !
Last modified: March 17, 2023

---

# Login Timeout !

 *  Resolved [alshizawi](https://wordpress.org/support/users/alshizawi/)
 * (@alshizawi)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/login-timeout-2/)
 * Hello ,
 * I am facing a problem every time when i log in , after some time like few minutes
   of activities on editing viewing or visiting page , suddenly it asks to login
   again !
 * I clear the cache on my browser , i installed a cache plugin to clear the cache
   on the site , but still i am facing the problem ,
 * what could it be from and how to solve it ?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Adam Muiz](https://wordpress.org/support/users/adammuiz/)
 * (@adammuiz)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/login-timeout-2/#post-16570332)
    - Try deactivate all plugin to troubleshooting
    - Try use another web browser.
 * If you still have problem log in, make sure your hosting server is on good condition.
 *  Thread Starter [alshizawi](https://wordpress.org/support/users/alshizawi/)
 * (@alshizawi)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/login-timeout-2/#post-16656703)
 * I fix it by adding this snippet for Session Expiration Time :
 *     ```wp-block-code
       /** Session Expiration Time - Login Time */
   
       add_filter('auth_cookie_expiration', 'my_expiration_filter', 99, 3);
       function my_expiration_filter($seconds, $user_id, $remember){
   
           //if "remember me" is checked;
           if ( $remember ) {
               //WP defaults to 2 weeks;
               $expiration = 14*24*60*60; //UPDATE HERE;
           } else {
               //WP defaults to 48 hrs/2 days;
               $expiration = 2*24*60*60; //UPDATE HERE;
           }
   
           //http://en.wikipedia.org/wiki/Year_2038_problem
           if ( PHP_INT_MAX - time() < $expiration ) {
               //Fix to a little bit earlier!
               $expiration =  PHP_INT_MAX - time() - 5;
           }
   
           return $expiration;
       }
       ```
   
    -  This reply was modified 3 years, 1 month ago by [alshizawi](https://wordpress.org/support/users/alshizawi/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Login Timeout !’ is closed to new replies.

## Tags

 * [login](https://wordpress.org/support/topic-tag/login/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [alshizawi](https://wordpress.org/support/users/alshizawi/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/login-timeout-2/#post-16656703)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
