wpexpertsio / password-protected

Password protect your WordPress site quickly and simply
https://wordpress.org/plugins/password-protected/
69 stars 63 forks source link

Plugin not working in Word Press #172

Open mokelley31 opened 4 years ago

mokelley31 commented 4 years ago

I am using the password protected plugin in wordpress, however it is not working. It is almost like it is not reading the password when I save it. The steps I took to enable: 1) Checked enable password 2) Typed password 3) Clicked save. 4) Get a message saying password saved. The steps and outcome to testing: 1) Went to website 2) Get promoted for password 3) Entered password 4) The page reloads to the same password page with no error 5) Type a random password 6) Website opens fine

Any advice?

ghost commented 4 years ago

After thorough testing, seems that this behaviour happens, at least, with LiteSpeed Cache plugin activated.

It seems a cache issue that has been already reported here:

https://wordpress.org/support/topic/litespeed-cache-password-protected/

Adding the code to your child theme functions.php file provided by @rxnlabs DOES NOT SOLVE the issue.

Until now, there are two changes in customization that you have to modify in order "Password Protected" plugin to work fine with "LiteSpeed Cache":

  1. v3.4.2: Cache -> Excludes -> Do Not Cache Cookies -> bid_1_password_protected_auth

  2. v3.4.2: Cache -> Excludes -> Do Not Cache Query Strings -> password-protected

In my case, these settings solve the issue.

@mokelley31 can you please let us know if you have a cache plugin installed in your WordPress site? Many thanks!