Doesn't Work with WP Super Cache


The plugin was working as expected until I updated WP. Since updating it stopped working. When you enter the password the page would reload and still display the enter password content rather than the protected content. I thought it may be a conflict with a plugin or theme so I tested it on a clean install with no plugins active on the WP 2016 theme and it worked as expected. I then activated and deactivated one plugin at a time until I found the culprit. Once I activated WP Super Cache it stopped working and I got the same issue.

To create a work around I entered the page URL into WP Super Cache advanced settings to not cache that string. However, I am pretty sure there is a simple coding change that would fix this issue. If I had time I would debug it myself, however, I am strapped for time at the moment.

If you could let the developer know so that he can include a fix for this in the next release I would appreciate it.

Have a great day!

Dr. Pat

  • Aaron
    • CTO

    For this plugin to work with full page caching you have a few options:
    1. Exclude the pages that you use the protection on in the cache plugin settings (Super cache has a setting for this)
    2. Exclude this plugin's specific cookie "psc-postpass_*" from being cached. I don't see an option for this in Super Cache (most other caching plugins have this), but if you are using the htaccess method then you could simply edit your htaccess super cache rules directly.

    There would be a line that looks like:
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    and you can add our cookie like:
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_|psc-postpass_).*$

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.