For one reason or another, you may want to allow only certain people to view your website. From online magazines to online service businesses and message boards, everyone routinely restricts access to all or part of their websites. And it’s really simple to do – you just install and install a membership plugin and you’re done.
But what if you are not interested in restricting access based on membership? What if you are a developer hired to build a WordPress website and now wants to show his client a live version of the website? You don’t want the customer to go through hoops and have to sign up for their own website.
This is one of those situations where it makes sense to put an entire website behind a password without any member registration. An elegant solution to restrict access to an otherwise live website. It’s also really easy to set up thanks to a simple plugin!
How to Put an Entire Website Behind a Password
If you check WordPress.org for password protection plugins that will work on an entire website, you’ll likely come across it. Password protected. With over two hundred thousand active installs and a good average rating, the plugin is definitely the most popular plugin for this purpose. It doesn’t hurt that it’s free.
The plugin also has a few downsides that you should be aware of. For example, any content and images you upload are not protected. Anyone with your links can access them. The plugin also doesn’t work well on websites that use caching via a plugin or the host’s service. Finally, If you run into any bugs or issues, it might be better to point them out on the plugin’s GitHub page rather than on WordPress.org.
However, if you are happy with these negatives or just want to have an easy access control solution before the official launch of a website, you can go ahead and install the plugin. From your website’s control panel, navigate to: Plugins > Add NewSearch for Password Protected and install the plugin and enable it when it appears in the search results.
After installing the plugin, you can find it in the list of installed plugins and access its settings from there or navigate to: Settings > Password Protected for plugin settings. Either way, you’ll end up looking at a UI where you can: set password protection status, permissions, password, IP exceptions and if you want the plugin to remember you and for how long.
These are the only options the plugin has. After setting these up, anyone trying to access your website from a non-whitelisted IP address will be asked to enter a password before accessing the website.
What Else Can You Password Protect in WordPress?
Being able to protect your website with a password is fine, but it’s not the only option you have. WordPress is developed with password protection for certain parts of the website. In cases where WordPress does not have such protection, plugins can come into play. Let’s see how you can protect certain parts of your WordPress website with a password.
Posts and Pages are Password Protected in WordPress
Sometimes all you want to do is make sure people don’t have access to certain posts or pages on your website. There are several reasons why you might want to do this; for example, ensuring that your work is well reviewed by a third party before publishing.
If this is something you want to do, don’t worry – WordPress has given you an easy option to do this. We wrote an article about this before so read on to get all the detail.
Password Protected Categories of Posts
If you want to protect more posts at once with a larger brush and password, you can do so using a free plugin. Access Category Password. After installing and activating the plugin, navigate to: Settings > Access Category Password. There you will find all the plugin settings.
The plugin allows you to choose the post categories whose content you want to password protect. You can also choose between session and cookie protection, excluded roles, and various messages sent to the visitor. You will even be able to change the form that changes the content of the articles you protect with the plugin.
Password Protected Parts of Posts
But what if you want something that lets you paint the tiniest details, rather than a wider brush? Is there a way to password protect only some of the postscontains a plugin called and Passster – Password Protection. If you install and activate the plugin, you will find a new option in your dashboard menu, aptly named Passster. Clicking on it brings you to the plugin’s option.
To truly protect parts of your content with the plugin, you need to use a shortcode with the following structure:
[passster password="123"]your hidden content[/passster]
You can change the password “123” to anything you want and place the content in the middle of the shortcode. When someone visits the post with the content, they won’t be able to see the content you’ve added to the shortcode until they enter the password.
Let’s wrap it up!
Password protection is a useful way to restrict access to your website, even if you don’t have a pricing plan or only allow certain members. Since WordPress doesn’t have a native function to restrict access this way, you’ll have to rely on a plugin for help.
However, this may not be the case if you are only interested in protecting certain pages or posts on your website – WordPress has this option built in. On the other hand, if you want to zoom out and protect more posts at the same time, or zoom in and protect certain parts of certain posts, you’ll have to turn to plugins once again.