Pick our brains...

WordPress Password Protected Pages + Sucuri Cache

 

Is your password protected page on WordPress not working?

Does it keep reloading the same page even though you’ve entered the correct password?

Do you get a blank page that has this in the URL: /wp-login.php?action=postpass

If your WordPress site has Sucuri installed and the Firewall running, you may encounter a problem with Password Protected pages.

After troubleshooting and Googling, I figured out the solution so I wanted to document it here for anyone else searching.

From Sucuri’s knowledge-base:

11. Non-Cached Pages

Some platforms/tools may not send the right cache headers, such as WordPress password protected pages. In cases like that, you need to insert the page URL into the Non-Cached URLs list. Don’t forget to clear Sucuri Firewall cache after adding the URL or it’ll not work as expected.

 

 

Follow these instructions:

1.) Login to Sucuri

2.) Go to Non-Cache URLs area, and add your password-protected page’s slug, select Equals and click Add URL.

Non-Cache URLs

Go to the Sucuri Firewall Dashboard and click Performance -> Non-Cache URLs. There, just add the full address of the directory or files you want to avoid caching and click the Add URL button.

 

3.) Then clear the page cache while you’re in Sucuri.

Clear Cache – Per File

You can also clear the cache for individual pages or files by going to Performance -> Clear Cache – Per File in Sucuri Firewall’s settings. Enter the file URL you wish to clear and then click the Clear Cache button.

4.) Wait a few minutes to let the cache get fully flushed, and then test.

Note: When testing in Firefox, I had to clear browser cache too, and wait longer than the other browsers for some reason.

Hope that helps!

CB

  • http://crispinbixler.com Crispin Bixler Nisimyan

    Adding this as another thing to try: https://wordpress.org/support/topic/password-protected-pages-go-blank/ “uploaded a fresh copy of wp-login.php extracted from the latest version of WordPress, and that solved my problem.”

  • Tanner Chung

    I am experiencing the same issue and I suspect it has to do with Varnish Cache. Anyone else facing this problem?