How to password protect anything (or everything) on your WordPress site.

Source.

Everything you put on your WordPress site is accessible to the whole wide web by default.

So, what do you do if you want to hide your website while you’re building it?

Or grant exclusive access to staff members, your subscribers or loyal customers?

You use password protection.

With just a few dozen clicks and a dollop of enthusiasm, you can password protect anything and everything on your WordPress site.

Whether you want to protect pages, posts, categories, or your entire WordPress empire, we’ve got you covered.

How to password protect an entire WordPress site.

If your site is currently a work in progress or is undergoing maintenance, it’s a good idea to hide it from the world.

Password protecting your site during the building and maintenance periods allows you to keep your web design away from prying eyes until you’re good and ready for the big reveal.

Setting up sitewide password protection also means that you will avoid disappointing potential visitors (which can negatively impact your SEO).

Another reason you might choose to protect your entire WordPress site is so that you can have total control over who has access to it. 

The quickest, easiest and most reliable way to password protect your entire WordPress site is using a third-party plugin like this one by Ben Huson:

wordpress password protected

Here’s how to set it up.

1. Head on over to your WordPress dashboard and select Plugins then Add New.

plugin for password

2. Type Password Protected into the search bar on the top right.

3. Click the grey Install Now button and activate the plugin when prompted. 

4. Next, go to Settings then select Password Protected. You’ll see the following settings options:

password protected settings

5. Check the top box next to Password Protected Status to password protect the whole site. 

The Protected Permissions box lets you grant access to administrators and logged in users without having to type in a password. 

6. Go ahead and check both of those boxes (administrators and logged in users) to avoid having to keep typing in the password over and over.

7. If you want to, you can also enter an IP address (or multiple IP addresses) to allow anyone using that IP address to access your site without needing a password. 

8. You can choose to either use your existing WordPress password or to create a new one. If you want to create a new one, you’ll need to type the new password in twice.

9. Don’t forget to click the blue save changes button on the bottom left!

Your site should now be password protected. All visitors to your WordPress site will see this login prompt:

wordpress enter password

Users simply need to enter the correct password to gain access to your website.

How to password protect individual posts and pages.

When it comes to protecting posts and pages, there’s good news and bad.

The good news is that is possible to do and it’s actually pretty quick and easy.

The bad news is that there’s no way to do it in bulk, which means that you’ll have to do every single page and every single post individually (groan).

Obviously, this can get pretty time consuming if you have a lot of posts or pages to protect. 

So, rather than laboriously going through all of your content piece by piece, it might be worth either password protecting by category (we’ll talk you through how to do that in the next section) or perhaps seeking out a well-reviewed third-party plugin to save you some time.

If you only have a few pages or posts you want to restrict access to, here’s what you need to do.

1. In WordPress, first, go to the post or page that you want to password-protect.

You should see a box called Publish on the right-hand side of the editor. Here’s what it looks like:

password protect a post

See that eyeball icon on the top right?

2. Next to the eyeball, where it says Visibility, click edit (as shown in the image above).

You will now see the following options:

publish a password protected post

3. Go ahead and select the option that says Password Protected and then enter your chosen password and click OK:

enter password on a password protected post

Pro tip – use the same password for multiple pages or posts to allow easy access to all of the protected content with only one password!

4. Hit Publish for new content or Update (for content that’s already been published) and voila! 

Your page or post will now be fully protected.

Anyone trying to view your password-protected content will now see this message:

your page or post is now password protected page

Please note that the title of your post or page will not be hidden.

People will also be able to see the publisher and the category, providing that these are enabled for your theme.

How to password protect WordPress Categories.

If you have a lot of content that belongs to the same WordPress category, like blog posts or images for example, then you can protect all of the content in that category at once.

This method is a great time-saver and is perfect for anyone who wants to grant special access to content to certain groups.

Maybe you have a business that’s based on membership tiers and you want to give access based on the package that users are subscribed to. 

Protecting posts, pages or images by category allows you to do this quickly and easily.

Simply create a WordPress category like “premium images” for instance, then you can password protect that category and provide the password to your chosen group.

Any subcategories that you may have set up under the main category that you are protecting will also be password protected.

Here’s how to protect your content by category.

For this method, you will need to purchase the Password Protect Entire Catagories plugin. It’s $49 to get a licence to use it on a single site for a year:

password protected categories

Source.

There are other options such as The Access Catagory Password plugin, so feel free to explore that one if you don’t like the idea of spending $49 each year.

1. Once you have bought the Plugin, from your main WordPress dashboard go to Plugins and then Add New (same process if you’re using an alternative).

2. Select the option to Upload Plugin and then select the appropriate file to upload and click open. 

3. Click the grey Install Now button then hit Activate when prompted.

4. Next, you need to enter your licence key. Go to Settings then you should see an option called Protected Categories: 

password protect categories

5. Go ahead and enter your licence key in the box at the top.

6. Select your password expiry date and other preferences and save the changes. If you want to stick with the default settings that’s fine.

7. In WordPress, go to Posts and Categories. You’ll see this screen:

categories password

From here you can create a new category to protect. 

8. Enter a name and a slug (you can use the same word for both – i.e. the category name and the slug can be identical). 

9. Scroll down to where it says Visibility right at the bottom and select Password Protected.

10. Type in your chosen password and hit the big blue button that says Add New Category. 

11. Once you have created your category, you can hover over it and select edit.

12. On the Edit post screen, tick the box that says Password Protected and you’re done!

Let’s wrap this up!

So there you have it, folks. You now know how to password protect anything and everything on your WordPress site!

Password protection is an extremely useful tool for controlling who has access to your site and when. Use it wisely and you can maximise not only your membership numbers but your sales as well.

I hope that you found this tutorial to be both useful and easy to follow and I wish you the best of look with your future WordPress adventures 🙂

Please Like and Share if you found this helpful!