• Resolved jacobhalton

    (@jacobhalton)


    I’m trying to just use the default WordPress password function for single posts.

    It seems to work sometimes, but other times I’ll type the password and hit enter, and it just refreshes the page with the page still locked, asking for the password again.

    One thing that seems to fix it is if I reset the cache of my site, but this isn’t a solution because I never know when it’ll break and I can’t be expected to refresh my site cache constantly just in case it’s broken.

    I’ve also tried plugins that can do this, and none of them seem to work.

    https://wordpress.org/plugins/password-protect-page/ This one seems to be simple, but when I set everything up, it doesn’t protect the post at all! It will show that the post has a password, and is currently protected. But clicking the link will just open the entire post and there is no password field.

    This seems like a strange problem to have, because it’s a default WordPress feature, and I’m not sure why it’s not working on my site. It looks like I should be able to just set any post to “Password Protected” and it should be fine, but this is turning into a problem so big that I may not be able to use WordPress for my site at all if I’m not able to password protect anything.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s the caching that’s causing the problem.

    A quick workaround is to configure your caching plugin to NOT cache the password-protected page(s).

    If you really want to cache password-protected pages, work with your caching plugin’s author to find a solution.

    What caching plugin are you using, by the way?

    Thread Starter jacobhalton

    (@jacobhalton)

    @gappiah Thank you, I’ll try that and see if it works.

    Just a couple questions:
    1. Why would caching the page make the password form not accept the password? I haven’t changed anything between when it works and stops working, and in fact to “fix” it, I usually just need to log into my wp-admin, and then the password for those posts will work again 🤷‍♂️
    2. What does it do when I set a page not to cache? Could that cause any other problems?

    I’m using Litespeed cache, since it was standard with my wordpress install. I don’t really know much about development, and the purpose of doing my site this way was to save money instead of using something like squarespace, while not having to do much coding (or any if possible)

    Thread Starter jacobhalton

    (@jacobhalton)

    @gappiah Actually, I put the url for that page in exclude for litespeed cache, and now the page bypasses the password protection entirely

    I put the url for that page in exclude for litespeed cache, and now the page bypasses the password protection entirely

    If the URL in question is the one you provided above, then my experience is different: I see the prompt to enter the password to view the page, and when I hit the “Enter” button (with a random or no password), I’m told I entered the wrong password. I don’t see the content on the page at all. Please see screenshots below.

    Just a heads-up:

    1) If you didn’t do it earlier, you should flush the cache so to clear the existing cache, if any
    2) You should be testing from a new incognito/guest window (or even a totally different browser/computer if possible) — where you don’t have any existing login cookies.

    NB: I’ll respond to your earlier questions later, a little busy now.

    Thread Starter jacobhalton

    (@jacobhalton)

    @gappiah I think it works now? I reactivated that plugin https://wordpress.org/plugins/password-protect-page/  and flushed the cache, but also put this URL in the “do not cache” section of Litespeed.

    Before, putting that in do not cache just turned the password protection off entirely, but I think it’s functioning properly now.

    Thank you for your assistance!

    Thanks to google, i am here. I had the same problem and excluding the page from litespeed (after purge) solved it i think. (only using, litespeed, no password protection plugin)

    But the page i am protecting is a little photo heavy (factory secret production photo gallery with more thn 150 photos) . So they load slowly now. I think i am OK with it. better than not to log in experience.

    But if you have any advise, i am here to listen. Thank you.

    @mberkerolcer:

    Thanks to google, i am here.

    “Me too” posts are not allowed here: https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too

    If you have a question or need advice, please start your own topic to ask a question and provide the address of the site you need help with, so support volunteers can help you.

    Good luck!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Password protected pages sometimes work and sometimes don’t’ is closed to new replies.