How to create a password protected WordPress page using a plugin (Complete Guide)

How to create a Password Protected page using a plugin on WordPress (Complete Guide)

A password protected WordPress page lets you restrict access to content on your website. Discover the easy way to password protect any part of WordPress including whole groups of pages, categories, posts, and more.

A password protected WordPress page lets you restrict access to content on your website. This is perfect for anyone that wants to offer exclusive content to specific users only, or hide content from regular visitors.

While WordPress offers the basic facility to password protect a page, it has some major limitations. Most site owners need a more professional way to create hidden and password protected pages, posts and other content.

Fortunately, there's an easy solution. The best way to create a password protected WordPress page is by using the Password Protected Categories plugin. Keep reading this tutorial to learn how to use it to create any type of password protection for the content on your WordPress site.

How to password protect an individual WordPress page (and why you shouldn’t bother!)

First, let's look at how to password protect a page in WordPress without a plugin, and why it's a bad idea.

Creating a password protected WordPress page is actually pretty simple:

  1. Start by navigating to the page’s edit page screen.
  2. Click on the Visibility button then select Password Protected.
  3. Now enter a password and click on the Update button to continue.
Password protected WordPress page

Here’s how users will be able to enter a password and access the password protected WordPress page from the front-end:

Front-end password form

There are several problems with this approach:

  • It's time-consuming to set up because you have to password protect each WordPress page individually. There's no way to password protect multiple WordPress pages at once or an entire WordPress site, using a single password.
  • In addition to this, it is also not user-friendly for site visitors due to limitations in the way WordPress uses cookies. Your website visitors will have to enter the correct password for each page they access on your website, even if you’ve used the same password to protect multiple pages 🙀
  • Site visitors who don’t have the password can still see certain parts of content from the restricted page. It doesn’t fully hide the page from people who don’t have access. This looks unprofessional.
  • Unauthorized users will still be able to see restricted content in public areas of your WordPress site including sitemaps, search engines, widgets, and newsletters. As a result, this can cause poor SEO and lead to confusion. They will be able to partially see your page in SERPs but not actually visit them.
  • There's no way to customize the wording of the login form for password protect pages.

As you can see, password protecting individual WordPress pages isn't ideal. Luckily, there's a better way.

A better solution: Use the best WordPress password protected page plugin

The best way to create a WordPress password protected site or page is by using a plugin specifically designed to let you restrict content by using secure passwords.

Password Protected Categories is the perfect WordPress password protected page plugin. It offers an intuitive way of password protecting certain parts of your site while improving user experience.

Here's why it's better than password protecting individual pages:

  • It's quick and easy to set up because the password protection works at category level rather than per page.
  • Users enter a single password to unlock entire groups of pages - no need to enter passwords multiple times.
  • The Password Protected Categories plugin automatically hides protected pages from search engines and from real users who haven't entered the password.
  • You get a fully customizable login form.
  • If some of your users already have an account on your WordPress site, then they can bypass the password protection. For each password protected category, simply select the user roles or even specific users who should have automatic access.

The Password Protected Categories plugin works for any post type including WordPress pages, WooCommerce pages, and blog posts. It also offers an easy way to password protect any other custom post type on your WordPress site. It's mnot just for password protecting pages 🚀

This method is also great if you're building a membership site: you can password protect only your premium post categories, leaving you with the rest of your site public. This is a better option than using a membership plugin as it's so much simpler to set up.

Hide password protected pages and categories

The Password Protected Categories plugin offers a great way to hide password protected categories and all the pages within them from the public parts of your site. This way, people won’t even know the selected password protected WordPress pages exist unless you want them to.

Alternatively, you can leave the password protected pages visible on your public site. When people click on them, they will be promoted to enter the password. Unlike with pages that use the basic WordPress password protection, you can customize the login form. That way, you can add a clear message explaining that the page is password protected and what to do next. That way, you get the best of both worlds for people with and without the password.

No need to password protect pages individually

The password protected pages plugin offers an intuitive setup. All you need to do is set a password for any category of pages and the plugin will cleverly protect all the pages within that specific category.

This way, you save a lot of time password protecting multiple pages on your website.

Better for your users

The Password Protected Categories plugin also offers an easy login experience for people who have the password. You redirect users to an attractive login page where they can enter the password and instantly be redirected to the category of pages that matches the password.

Then, users can access all the pages in that specific category and subcategory, without having to re-enter any passwords. They can freely navigate the restricted content and jump through multiple pages without being distracted by a login form page over and over again.

Supports multiple passwords

You can also create multiple passwords and assign them to specific categories using the WordPress Password Protected Categories plugin.

Alternatively, create multiple passwords for the same group of pages. Give each password to a different user. This means that you can easily revoke (i.e. delete) a password for people who no longer need access.

User and role protection

Additionally, the plugin lets you restrict page categories to specific logged-in users only based on their user role or username. This is a great way to offer exclusive content or create a “members-only” area on your website.

The best way to use this is to give normal passwords for people who don't have their own user account. If you're giving access to anyone who does have an account, don't waste their time by giving them a separate password. Instead, just edit the category and give access to that user. They will automatically get access whenever they're logged in, while everyone else must enter the password.

For your own ease of use, we also recommend giving the Administrator user role access to your password protected categories. That way, you can view them without needing to enter the category password.

How to password protect WordPress pages and other content

Next, I’ll show you how to password protect WordPress pages easily in three simple steps. For this, you’ll need a WordPress site along with the Password Protected Categories plugin.

Additionally, if you want to protect pages then you’ll also need a plugin that allows your WordPress pages to be categorized. We’ll be using the free Easy Post Types and Fields WordPress plugin to create page categories.

Step 1: Install Password Protected Categories

Once you’ve created and added page categories to your WordPress website, install the Password Protected Categories plugin on your website.

Activate the plugin and follow the instructions in the setup wizard. Untick the Show Categories? checkbox to make sure unauthorized users don’t access the hidden page categories.

Step 2: Password protect WordPress pages

It’s very simple to password protect WordPress pages using the Password Protected Categories plugin.

First, you need to add categories to your pages because this isn't part of WordPress as it comes. (Skip this if you're password protecting other types of WordPress content which already have categories or custom taxonomies.) To do this:

  1. Install the free Easy Post Types and Fields plugin via Plugins → Add New.
  2. Skip the setup wizard and go to Post Types → Manage → Other Post Types.
  3. Click to add a new custom taxonomy to the 'Page' post type. Tick the 'Hierarchical' box and call the taxonomy whatever you like, such as 'Page Categories'.
WordPress page categories plugin

Once you've done that, navigate to PagesCategories (or whatever you called your page categories) and select the category you want to restrict access to.

add password to woocommerce protected categories

Hide the category by selecting the Password protected check field under the Visibility option. You can enter your password in the text field below the selected option and add multiple passwords using the (+) button. Optionally select any users or roles who should have access without needing to enter the password.

Once you’re done, press the Update button to save changes.

Step 3: Create a login form

Now, we want to create a central login page for all your password protected WordPress content.

Navigate to PagesAdd New to create a new login page and customize it however you want. Paste the [category_login] shortcode in the login page you just created and click on the Publish button to continue.

You can customize your login page using the Password Protected Categories plugin. Head on over to SettingsProtected Categories from the WordPress admin panel. Here, you can customize the button text, the title, the login form message, and the password label. Once you’re done click on the Save changes button to continue.

Users will be able to access your content by entering any of the passwords assigned to the specific page category. Here’s how the password form looks on the front-end of your WordPress site:

Password form preview front-end

Once the user enters their passwords, they will be able to access all pages or all restricted content which use that password.


Now we know how to password protect WordPress pages and other types of content, let's go through some common questions.

How do I password protect my entire WordPress site?

In this article, we have focussed on making specific areas of a WordPress website private. If you're wondering "How do I make my WordPress website private?" then that requires a slightly different solution.

To password protect an entire WordPress site, you can use Password Protected Categories and put all your content within private categories. Alternatively, check out our article on 5 ways to password protect an entire WordPress site.

How do I password protect a WordPress directory?

Some people want to password protect what they refer to as directories on their site. If you're talking about a directory on the front end, then this is basically the same as a category of custom taxonomy. As a result, you can do it with the Password Protected Categories plugin which works with any type of category or taxonomy.

How secure is my WordPress site with password protection?

Password protection is not the most secure way of restricting access to a WordPress site. That's because passwords only offer a single layer of security and there's no 2-Factor Authentication (2FA). In addition, passwords can easily be shared because they're not linked to user accounts.

I only recommend using password protection to protect content that you want to hide from public view, but which is not particularly sensitive. For example, a password protected portfolio normally needs to be restricted but isn't very confidential.

For more confidential website content, it's better to use the 'Role' or 'User' options in Password Protected Categories. These integrate with WordPress user accounts which are much more secure.

Is it possible to password protect parts of a WordPress page?

The Password Protected Categories plugin only lets you restrict access to enter categories and their pages or posts. If you wanted to protect parts of a page then you'd need a plugin which comes with a shortcode to restrict access to specific content. For example, you can do this with Advanced Access Manager (see their tutorial about this).

Password protect WooCommerce stores, products or categories

If you have a WooCommerce store, you might need to password protect your entire store, an individual product, or specific product categories. Just like password protecting a standard WordPress website, it's easy with the right plugin:

  • To password protect an entire WooCommerce store, I recommend the WooCommerce Private Store plugin. This only takes a few minutes to set up and is very easy to use. You can lock your store using password protection, or automatically unlock it for specific logged in users or roles.
  • Alternatively, you can use the WooCommerce Protected Categories plugin to restrict access to specific areas within your eCommerce store. This is just like the Password Protected Categories plugin featured earlier in this article, but is purpose-built for WooCommerce products 🛒

Where to get the WordPress password protected page plugin

WordPress doesn’t offer much native functionality to password protect pages. This can cause users to still see parts of your page on search engine results pages and on your WordPress site. It's much better to use the Password Protected Categories plugin to lock down entire areas of your store.

The plugin is super-flexible and only takes a few minutes to set up. It comes with a 30-day money back guarantee, so what are you waiting for? Start password protecting WordPress today 💪

Please share your thoughts...

Your email address will not be published. Required fields are marked *