WordPress Password Protected Page not Working

Being a WordPress site owner, we bet that you are no stranger to the WordPress default visibility options. Among the 3 options of Public, Private, and Password protected, the latter stands out as the most popular one.

This function allows you to hide your private content from public eyes under a password form. Its straightforward setup helps WordPress site owners make their content private without hassle.

However, there are still limitations when using the WordPress built-in password protection feature. In our WordPress Plugins Help and Share for Non-techies Facebook group, we’ve received a lot of questions regarding a WordPress password-protected page not working. This issue annoys many WordPress site owners, especially newbies.

That’s the reason why we write this article to walk you through detailed steps to figure out the issue. We’ll list potential reasons that might prevent your WordPress password-protected page from working correctly.

At the end of our post, we’ll introduce to you an all-in-one solution, which will give you more control over your password-protected content than the WordPress default function.

Why WordPress Password Protected Page not Working

“To every problem, there’s almost a simple solution.”

When you suffer from any issues, don’t be too panicked. Instead, let’s double-check everything in turn from the simplest to the most complicated one.

The issue of improper password-protected pages might come from your post types, cookies, and caching.

#1 You’re Protecting a Custom Post/Page Template

When using the “Password protect” option in WordPress, only the content area is locked by default. That’s why when you password-protect pages and posts only, everything looks fine in the front end. However, when securing a custom post type or custom page template with extra fields, the function fails to work as expected.

So first and foremost, you should double-check if you’re protecting a custom post type or custom page template.

If you aren’t in this situation, move to case 2.

#2 WordPress Cookies Save Your Passwords

By default, WordPress uses cookies to save user’s information as well as their access in 15 days. So if you’re locking a page or post but can still view it without entering a password, there might be something to do with the cookies.

At this point, please try to:

  • Clear cookies.
  • Open the page in an incognito window.

You might also want to change the cookies default setting. To do that, simply add the “post_password_expires” filter to the functions.php file to adjust the expiration time.

function mind_set_cookie_expire( $time ) {

return time() + 86400; // 1 day

// Some other examples:

// 1 Minute would be:

// return time() + 60;

// return 0; to set the cookie to expire at the end of the session.


add_filter( 'post_password_expires', 'mind_set_cookie_expire' );

You’ve tried this but it still doesn’t work?

Move to the next case.

#3 You Have a Caching Problem Caused by Plugins or Browsers

WordPress site owners are keen on caching plugins to speed up their sites. This method sometimes causes unexpected problems for protected content, e.g. sending the user a cached public version.

At this point, please try to clear the cache on your browser first to resolve the issue when your WordPress password protect page not working.

If you’re also using any caching plugins, make sure that you do a full cache clear.

That’s it!

Anytime you come across the issue that makes your protected content public, simply follow our 3 checking steps above to find the root cause. Accordingly, you can find the best solution to resolve it, e.g. using codes or plugins.

Intending to find a plugin that helps you password protect your content with ease?

PPWP Pro should be your ideal solution.

Is There any All-in-one Solution for Password Protection?

The answer is yes.

In this section, we’ll introduce to you a powerful plugin called PPWP Pro that provides you with a complete solution for password protection.

What makes this method more outstanding compared to WordPress’s default feature?

In fact, the built-in WordPress function helps you protect pages and posts on a basic level. As such, it doesn’t fulfill most of the common use cases, i.e. protecting custom post types, generating multiple passwords, restricting password usage, etc.

That’s where the PPWP Pro plugin comes in handy.

Protect all Custom Post Types

This plugin gives you a user-friendly UI to protect all post types with a click. No code is required, even non-tech-savvy users can handle it without hassle.

Set Multiple Passwords per Protect Content

With the WordPress default function, you can set only one password for each protected post. It’s not applicable for use cases where you’d like to send each user a unique password.

PPWP Pro solves this problem by giving you the ability to set unlimited passwords per post.

In case you’d like to import a thousand ones, don’t worry. You have an importing function at hand!

Now each user can have their own passwords to use. It’ll decrease the situation where your password is leaked out without your permission.

Restrict Password Usage

Giving each user a unique password is a choice. However, it cannot completely resolve the issue that users share their passwords with others.

At this point, the PPWP Pro plugin is a lifesaver when providing you with a function to restrict passwords. Just with a click, you can set the password expiry date as well as usage limit.

This function comes into practice when you just want to allow 1-time access to your protected content, e.g. online conference.

In conclusion, the PWPP Pro plugin is worth your consideration if you’d like to gain more control over your password-protected content.

Have You Found Out Why Your WordPress Password Protected Page not Working?

We’ve just walked you through a step-to-step guide on how to detect the root causes that make your WordPress protected-page content not working properly.

For your convenience, we’d like to sum it up here:

  • Double-check with the post type you’re protecting.
  • Check if the cookies are saved without your awareness.
  • Clear cache if any.

Besides, if you want to extend password protection with more advanced features, give PWPP Pro a try. No code required, user-friendly UI, especially it does provide you with a PPWP free version with essential features.

Is our article helpful for you?

Let us know in the comment section below!