Support » Fixing WordPress » Password protect page remembers

  • Hello,

    I am using password protection of some pages but it seems to set a cookie once the password is entered to remember to login. Is there a way logout or stop wordpress creating this plugin so you have to log in each time?



Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I’m looking for the same thing – I don’t mind users only logging in once to a protected page all the time the browser is open, but if the browser is closed, I want them to have to log in again the next time they visit the page. Any ideas?


    I am looking for the same thing! Any word?

    Hi there!

    Check out wp-pass.php in your wordpress directory.
    You’ll find a line like this:
    setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 2, COOKIEPATH);
    The value after the “+” indicates the time in seconds, the cookie stays valid. In this example it is valid for 2 seconds, setting it to 7200 would be equivalent to 2 hours.

    This solution works for me.
    You may find further information on:


    I tried this, but it didn’t work 🙁
    I have tried deleting files and cookies. But when I got back into the website and click on the page, it is already logged in. What else have I got to do to make this work?

    This worked perfectly for me. Just make sure you go into your cookies and delete the current wp-postpass_… cookie that is there as it will not overwrite it, but has to be deleted before the new 2 sec cookie takes it’s place.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Password protect page remembers’ is closed to new replies.