WordPress Password Protect Page

WordPress Password Protect Page

The moment you publish a post in WordPress, it becomes visible to anyone who visits your website. But if you need to hide content from the public,  you can password protect your pages or posts on your WordPress site.

Yes! You can restrict access to your pages/blog posts by introducing Passwords. Only visitors who have the correct password can view the protected content.

This feature comes in handy when you need to publish premium educational resources. Now, if you want to password protect your entire WordPress site or individual WordPress posts/pages – this article is for you.

In a short while, you’ll be learning:

  1. Reasons for password protecting WordPress sites
  2. How to password protect individual posts/WordPress pages
  3. Password protecting WordPress categories
  4. How to password protect a section of your page or post
  5. Password protect your entire site

Reasons for Password Protecting WordPress sites

There are a couple of reasons why you may choose to hide some content on your blog/site. For instance:

  • When your site is under construction or in maintenance mode
  • You are yet to obtain patent rights for the ideas shared on the site
  • When the content is controversial or sensitive
  • It is a membership site (though a membership plugin is better equipped for this purpose)
  • If you want only friends, family, or paying customers to see your site’s content
  • When you are publishing a premium course or educational material.

The scenarios listed above are tangible reasons why you may hide your site’s content. And for as long as you do not broadcast your password, your content remains protected.

Some of the websites where password protection is frequently used include:

In the next section, you’ll learn how to password protect posts and pages by yourself.

How to Password Protect Individual posts or WordPress pages

This is the easiest of them all. WordPress’s built-in feature lets you password protect a page or individual WordPress posts, you do not need a plugin. To password protect a page or post in WordPress, here’s what to do:

  • Open the page/post in the WordPress editor. Go to ‘Visibility’ at the right-hand side of your screen and click ‘Edit’.

How to password protect a page or host

The ‘visibility’ menu has three options; public, private, and password protected.

Setting a page’s visibility to ‘Public’ means anyone can view the page.

Private’ means only the admins can view the content of the page.

Password Protected’ means only those with the correct password can view the page.

  • Check the ‘password protected’ radio button.
  • Next, enter your preferred password. Don’t forget to use a hard-to-guess password.
  • Finally, click OK.

How to password protect a page or post

Voila! You have successfully password protected your post. Now, the content will only be visible when a visitor enters the right password. Otherwise, the content remains hidden. Ensure you give the correct password to your chosen readers.

This exact method can be used in Woocommerce stores especially when you need to protect some Woocommerce products. The screenshot below shows how your post will look at the front-end.

WordPress password protect page

If you need to password protect multiple pages/posts, you may use the same password for each one. Of course, it isn’t compulsory. Using one password for all password-protected content unlocks them all when a user inputs the correct password once. This will save your visitors undue stress.

You might ask – can I use this method to protect WordPress categories and an entire WordPress website? NO. The methods are slightly different. In the following sections, you’ll learn how to password protect WordPress categories and an entire WordPress site.

Password protecting categories

WordPress categories are groups of similar pages/posts. Sometimes you may need to password protect as an entire category. In such cases, engage a third-party WordPress plugin.

This is because WordPress lacks an inbuilt capacity to password protect WP categories. Access category password is a free plugin useful for this purpose. Install the plugin and activate it. Then, head to Settings >> Access Category Password.

How to password protect WordPress categories

Now, you should be on the plugin’s Settings page. This is where you configure the plugin.

Here is a brief explanation of each item on the plugin’s Settings page.

  • The password – Type in your preferred password in the space provided. And earlier said, use a hard-to-guess password.
  • Impacted categories – at this point, select the categories you want to password-protect. Posts belonging to protected categories will not be accessible to the public.
  • Granting users – you can grant express access to certain user roles. For example, checking the ‘editor’ box means that anyone with an editor’s account won’t have to enter a password.

password protect

  • Only single post – if you tick the ‘only single post’ box, visitors will see excerpts or contents of protected posts on other pages.

How to password protect WordPress categories

Finally, this WP plugin allows you to create the message displayed on your password-protected page. Amazing!

How to Password Protect a section of your page/post

We have discussed how to password-protect an entire page/post and category. But, what if you need to hide a part of the page instead of the whole page? In this case, you use a plugin – again. You can install Passster, a password protection plugin to do this.

As we have done previously, install and activate the plugin. Then, head to Settings → Passster and generate a shortcode with your password or create one manually. Save changes and copy the generated shortcode.

Using Passster

Then, click to edit the post you want to add password-protected content to. Paste the shortcode wherever you want in your editor and type in your protected content.

password protecting a part of a page with Passster

Save and publish your post. Now, your visitors can read your post except the section you placed within the shortcode. See the screenshot below.

WordPress Password Protect page

Password protecting an entire WordPress site

It is not difficult to hide an entire WordPress site from the prying eyes of the public. All you need is a plugin to get it done. Password Protected plugin by Ben Huson is the most popular plugin used for this purpose. It has more than 200,000 installations with amazing reviews.

To get started, install and activate the plugin just like any other WordPress plugin. If you are not sure how to do that? Read our comprehensive guide on how to install a plugin.

After installation, go to Plugins >> Installed Plugins >> Password Protected Settings to set up the plugin.

protecting an entire WordPress site

Plugin settings


There’s very little work left to do when the settings page opens up.

password settings

Here’s a breakdown of what the settings page entails:

Password Protected Status – when you check this box, your entire site is password protected. Otherwise, your site remains visible to anyone.

Protected Permissions – you may check any or all of the boxes to allow Administrators, logged in users express access. You may also choose to allow RSS feeds, and Rest API access. Visitors who have your permission can access your website without a password.

New Password – at this point, enter the password of your choice. Remember to make it difficult to guess.

Allow IP Address – you may enter an IP address in the space provided. Anyone who visits your site from that IP address won’t need a password to gain access.

Finally, Save Changes. Any visitor who doesn’t fall among those whitelisted will stumble on this page. However, anyone can access the images and files on your site, so far they have the direct link. This process only works for your main WordPress site.

login WP

By default, this page looks similar to your WordPress login page.



Have you been wondering how to protect a page/post or entire categories on your WordPress site? I hope this article has helped you. You don’t need to be a technical expert to get this done. Either use WordPress’s inbuilt password protecting feature or use a plugin.

One quick tip – password protecting your website isn’t enough. You should also protect your website from malware and other security issues. Read our tutorial on how to secure your site.

So, have you tried password protecting your site’s pages and posts? Let us know how it worked out, and if you need any help in the comments below.

Other Resources: