Title: password timeout
Last modified: March 14, 2019

---

# password timeout

 *  Resolved [rjoss](https://wordpress.org/support/users/rjoss/)
 * (@rjoss)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/password-timeout/)
 * Looks good and working just fine. My only concern is if the site/page will time
   out if it remains open for long periods? This would be a big security help for
   me?
 * Thanks for a great plugin
 * Richard

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

 *  Plugin Author [Andreas Münch](https://wordpress.org/support/users/andreasmuench/)
 * (@andreasmuench)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/password-timeout/#post-11314012)
 * The cookie saving the password will last 10 days, as defined by WordPress, not
   this plugin.
 * You can change that period with a code snippet added to your functions.php in
   your theme:
 * [https://wordpress.stackexchange.com/questions/295152/change-the-default-10-day-expiration-for-the-password-protected-pages-cookie](https://wordpress.stackexchange.com/questions/295152/change-the-default-10-day-expiration-for-the-password-protected-pages-cookie)
 * This example would save the password only 30 seconds:
 *     ```
       /**
        * Filters the life span of the post password cookie.
        *
        * By default, the cookie expires 10 days from creation. To turn this
        * into a session cookie, return 0.
        *
        * @since 3.7.0
        *
        * @param int $expires The expiry time, as passed to setcookie().
        */
       add_filter( 'post_password_expires', 'wpse_custom_post_password_expires' );
       function wpse_custom_post_password_expires( $expires ) {
           return time() + 30; // Expire in 30 seconds
       }
       ```
   
    -  This reply was modified 7 years, 2 months ago by [Andreas Münch](https://wordpress.org/support/users/andreasmuench/).
 *  Plugin Author [Andreas Münch](https://wordpress.org/support/users/andreasmuench/)
 * (@andreasmuench)
 * [7 years ago](https://wordpress.org/support/topic/password-timeout/#post-11495809)
 * I´ll mark this as resolved

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

The topic ‘password timeout’ is closed to new replies.

 * ![](https://ps.w.org/multiple-post-passwords/assets/icon.svg?rev=1963120)
 * [Multiple Post Passwords](https://wordpress.org/plugins/multiple-post-passwords/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-post-passwords/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-post-passwords/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-post-passwords/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-post-passwords/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-post-passwords/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Andreas Münch](https://wordpress.org/support/users/andreasmuench/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/password-timeout/#post-11495809)
 * Status: resolved