Yes, I’m ripping off content from Wordpress.org Forums to put this together, but I think it has to be done because password protected pages not working in Wordpress is still plaguing many users. It’s not convenient to flip through a zillion pages on the forum, so this compiles many possible solutions into an orderly troubleshooting procedure.
Want this fixed for you?
Going through all the steps can take several hours to days and requires different levels of skill in working with Wordpress and your server. So if your time is worth more than that, you can contact me to fix it for you. I’ll quote you and request payment before I get started. You will be refunded in full if I can’t fix your Wordpress password protected pages.
Troubleshooting Wordpress Password Protected Pages
Note: use incognito mode (or whatever your browser calls it) to test your password protected pages so that you’re not dealing with incorrect/old cookies during testing. After each step you perform below:
- Go to Settings > Permalinks and save permalinks
- Close any open incognito tabs/windows
- Open a new incognito incognito window
Make a full backup of your site and know how to restore your site before proceeding. I like the Backup Migration plugin because it will backup even the Wordpress core.
- Using Cloudflare? Put it in development mode – this will give you 3 hours to troubleshoot.
- Using a performance or caching plugins? Temporarily deactivate them. This includes WP Rocket, WP Fastest Cache, WP Super Cache, WP Optimize, Litespeed Cache and others. If this solves your issue, you may need to exclude your password protected page from cache, or just try a different caching plugin.
- Using a code minification plugin? Temporarily deactivate it. This includes Autoptimize and others.
- Switch to a default Wordpress Theme, such as Twenty Twenty-One temporarily.
- Go to WP Dashboard > Settings > Permalinks and click Save.
- If you use any privacy or member-related plugins, temporarily deactivate them.
- Edit the page that is giving you a problem. Set a new temporary password on the page and Update the page.
- Create a new post or page temporarily and assign a password to it.
- Test the temporary page in an incognito window. If it works, trash the temporary post/page, then consider recreating the actual password protected page from scratch.
- Deactivate ALL plugins. Unfortunately, this won’t pinpoint the issue, but at least you’ll know if one of your plugins has caused the issue.
Advanced Steps
If performed incorrectly, these steps could easily mess up your site. Get a developer to help if you aren’t familiar with anything you see below, and make a full backup before continuing.
- Go to WP Dashboard > Settings and review your global settings. If your home URL or site URL are incorrect, fix them and save changes.
- Be VERY careful here. Messing this up will bring your site down.
- If your site is supposed to be at https://…, make sure the URLs don’t just have http://…
- If your site should be served from www.domain.com, but the URL shown is just domain.com (or vice versa), fix it.
- Test your page in an incognito window.
- Skip this and get a developer to do it if you are not familiar with .htaccess:
- Make a backup of your current .htaccess file in the web root directory.
- Edit the .htaccess file.
- Look for any entries having to do with caching, expires headers, etc.
- Comment them out temporarily by prefixing the lines with a hashtag/pound character (#).
- Save the file.
- Test your page in an incognito window.
- Skip this and get a developer to do it if you are not familiar with wp-config.php or PHP in general:
- Make a backup of wp-config.php;
- Open wp-config.php;
- if there is a line defining the constant COOKIE_DOMAIN, comment it out;
- if there is a line defining the constant WP_HOME, make sure it is correct for your website;
- if there is a line defining the constant WP_SITEURL, make sure it is correct for your website;
- save and close wp-config.php.
- Test your page in an incognito window.
Are Password Protected Pages in Wordpress still not working?
The troubleshooting procedure above should help to identify site configuration issues. The next steps may get you sorted when the host’s configuration is the problem.
- Ask your host for help! Good hosting companies will get your WP credentials, log in, and set you straight. You may also want to inquire if there is any caching enabled for your account at the hosting level. If so, ask how you can toggle it off or exclude certain URLs. And let me know if you need Wordpress website hosting.
- Create a new WordPress installation in a subdirectory or subdomain and create one post/page with password protection and test it. If it works, your current hosting configuration is OK and something about your actual WordPress installation is conflicting with post/page password protection.
- Create a new WordPress installation on another host or clone your full wordpress installation to the new host and test it there. I know it’s easier said than done, but hosts are increasingly using sneaky methods to cache or tune their server for scalability (so they can stretch resources and make more money per client) and this can lead to issues in specialized cases.
- Hire a seasoned WordPress developer. Nobody wants to hear this or go this route, but if your time is worth $20, $30, $50, or $100 per hour doing what you know best, then coming up with $50-$100 to have your problem fixed frees you up to make money and it support those of us who offer as much support as we can for free but also make a living helping folks like you!
Did you find another solution?
Please leave a comment if you found a durable, lasting solution which I didn’t mention. I will add it to my list and give credit.
Coming soon …
I’m going to create a troubleshooting tool just for this issue. I know that reading through all the steps above is pretty tedious.
Leave a Reply