When you need to ensure only certain people can access all or part of your WordPress site or WooCommerce store, the answer is to password protect WordPress. If this sounds complex, don't worry - I'm going to tell you how to do it!
This tutorial makes it simple for people of any experience level to learn how to make your WooCommerce or WordPress private, and create password protected categories on your site in just minutes. We will cover native WordPress password protection options, as well as the top WordPress password protect plugins.
How you password protect WordPress depends on what type of website you have, what your users need to do on your site, and which parts of your site you need to keep protected. This guide explains everything you need to know on how to create password protected categories on WordPress and WooCommerce stores.
Without any need to code, you'll learn how to easily password protect:
- An entire WordPress website
- Individual WordPress posts and WordPress pages
- WordPress categories
- An entire WooCommerce store
- Individual WooCommerce products
- WooCommerce product categories
Click the links to skip ahead to the area you're interested in, or read on to learn it all! You can also watch a video version of this post below:
Password protect WordPress sites, posts, pages, or entire categories
With WordPress, you can choose to password protect your entire website, individual posts and pages, or specific categories.
You may like to protect your entire website if you only want certain people to be able to view it, if you're currently in the process of building it, or if your site's undergoing maintenance. If you just need to protect a couple of pieces of content, you can password protect posts and pages.
Alternatively, password protected categories can benefit your site in so many ways:
- Protect certain blog categories
- Create a completely private blog as part of a wider public website
- Protect specific areas of a portfolio or an entire portfolio
- Protect product categories for WordPress e-commerce plugins such as Easy Digital Downloads
- Password protect events, based on their category
- Create a membership site with private content
Continue reading to learn how to password protect any area of a WordPress site. If you need to password protect a WooCommerce store, skip ahead to the next section.
How to password protect an entire WordPress site
You might choose to password protect a whole site if:
- You only want certain people to be able to view your website
- You're in the process of building a new site and don't want it to be visible to the general public yet
- Your site's undergoing maintenance
To do this, you'll need either the WordPress password protect plugin, Password Protected or Coming Soon Page & Maintenance Mode:
Password Protected categories plugin
To password protect your entire website so that only certain people can view it, use a plugin called Password Protected:
This allows anyone you give a password to view your password protected categories site, without registering them as a user. Once activated, anyone who arrives on your site will be presented with the front-end WordPress login page below:
Then, they simply need to enter the password and will be able to view your entire site as normal.
To install this WordPress password protect categories plugin, in the WordPress Dashboard head to Plugins → Add New and search 'password protected'. Locate the plugin in the search results, click Install Now and Activate.
Head to Settings → Password Protected to access the Password Protected Settings. Check the box next to Password Protected Status to enable password protection.
Then, next to Protected Permissions, check Allow Administrators and Allow Logged In Users (note this gives you two options for allowing access by user roles, but obviously only give administrator access to show needs it!).
You also have the option to allow IP addresses as a method for restricting access. This is, however, a fairly advanced method so only use this if you know what you're doing. If you don't what an IP address is, you can safely leave this blank.
Lastly, all you need to do is type your chosen password twice next to New Password and click Save Changes:
Coming Soon Page & Maintenance Mode plugin
If you're in the process of building a new website, or your site is undergoing some scheduled maintenance, use the WordPress password protect plugin Coming Soon Page & Maintenance Mode.
Once installed, when you're logged in, you'll see your normal website, while logged out visitors will see a Coming Soon or Maintenance page. To install this plugin, in the WordPress Dashboard head to Plugins → Add New and search 'coming soon'. Locate the plugin in the search results, click Install Now and Activate.
Head to Settings → Coming Soon Page & Maintenance Mode to access the plugin settings. From here, you can enable either Coming Soon or Maintenance mode.
You can then add a logo, headline and message to appear on the page:
You can also add a favicon (the image on the browser tab), SEO title and meta description:
In Coming Soon mode, the page and header content will be indexed by search engines – a great way to get a head start on your site's SEO. In Maintenance mode the plugin will return a 503 code to search engines, which notifies search engines not index the current content and to come back later.
Using this plugin, you can also edit the Coming Soon or Maintenance page design, including background images and colors.
How to add password-protected categories to an individual post or page
WordPress comes with native functionality to password protect individual posts and pages. This needs to be done on a per single post or per page basis. Once enabled, anyone viewing protected pages/posts will be presented with a message to enter a password:
Note the title of the post or page will still be visible, as well as the category and publisher if these are enabled for your theme.
To password protect WordPress posts or pages, in the Dashboard, head to the post or page you'd like to protect. Then, in the Publish box, next to Visibility click Edit then select Password Protected. Enter your chosen password then click Update (or Publish if the post or page is yet to be published).
Password protecting lots of individual posts is laborious for you as a website owner and not user-friendly for website visitors. If you want to password protect more than a couple of pieces of content, that's when password protected categories come in handy.
This method is also great if you're building a membership site: you can restrict access to only your premium posts (marked under one category), leaving you with the rest of your site public. This is a better option than using a membership plugin as it means you only have to maintain one WordPress site.
How to password protect WordPress categories
Password protecting WordPress categories is quicker and much more user-friendly than password protecting individual posts. Using the plugin, Password Protected Categories, a single password protects and unlocks an entire category. To view password protected content, users enter a password to view all content in that particular category. They must have the correct password, keeping out unwanted visitors!
Password protecting a category also protects all its sub-categories with the same password, making it ideal for protecting areas of your site with more complex navigation structures, such as portfolios with multiple categories.
Password Protected Categories creates a Visibility option for each post category. This allows you to set the category visibility to Public, Password Protected or Private.
Buy the Password Protected Categories plugin and head to Plugins → Add New to upload the plugin file. Click Upload Plugin then choose the plugin file from your computer and click Open. Click Install Now then Activate Plugin
Go to Settings → Protected Categories and enter your license key. From here you can edit settings, including how long a category remains unlocked before the password expires, and the login form message. Alternatively, you can keep the default settings:
To password protect WordPress categories of your choice: go to Posts → Categories. From here, you can create a new category with password protection. Write the category name and slug (this is used in the URL, so can be the same as the name). Next, scroll down to the Visibility section and select Password Protected. Type your password and click Add New Category:
You can edit the visibility of existing categories by hovering over the category you want to change and clicking Edit.
Read the ultimate guide to WordPress password protected portfolios.
To categorize a post as password protected, in the Edit Post screen, check the box next to the password protected category:
Note in this example we're protecting the category "Lessons", as you could do on a membership site.
Password protect WooCommerce stores, a product or whole product 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.
How to password protect an entire WooCommerce store
If your entire wholesale website should only be accessed by approved customers, your store is members only, or you need to put your store on hold for a while, WooCommerce Private Store is the ideal WordPress password protect plugin.
This plugin hides all the shop related parts of your WooCommerce site without affecting other areas such as your homepage and blog. It even hides WooCommerce-related widgets. This means that you can include links in your navigation areas that will be hidden from public view, but visible to people who are logged in.
Buy the WooCommerce Private Store plugin and upload the plugin file by heading to Plugins → Add New, click Upload Plugin then choose the plugin file from your computer and click Open. Click Install Now then Activate Plugin. Next, in your Dashboard, go to WooCommerce → Settings and click the tab Private Store.
Here you can add the license key and edit the plugin settings:
Once activated, customers can only view the hidden store by entering a password or logging into their account:
How to password protect an individual product
Just like when you individually password protect WordPress posts and pages, you can use native WordPress functionality to password protect individual WooCommerce products. If someone attempts to add the product to their cart, they'll be prompted to enter a password:
To password protect a WooCommerce product, in the Dashboard, head to the product you'd like to protect. Then, in the Publish box, next to Visibility click Edit then select Password Protected categories. Enter your chosen password, then click Update (or Publish if the product is yet to be published).
But password protecting an individual product is not the best choice in many situations. If you want to sell more than a couple of products to wholesale customers, for example, creating individually password-protected categories is going to use up a lot of your time, and it's not very user-friendly.
How to password protect product categories
WooCommerce Password Protected Categories makes an entire product category private. This allows you to easily create wholesale areas, client-specific products, a private area for individual clients, and members-only stores.
This WordPress password protected categories plugin creates a Visibility option for each product category, allowing you to set entire categories to Public, Password Protected or Private.
Buy the WooCommerce Password Protected Categories plugin and upload the plugin file by heading to Plugins → Add New, click Upload Plugin then choose the plugin file from your computer and click Open. Click Install Now then Activate Plugin.
Go to WooCommerce → Settings → Products. Click the Password protected categories link at the top of the page and enter your license key. From here you can edit settings such as how long it takes for a password to expire and the password form message.
To password protect product categories, in your WordPress Dashboard, go to Products → Categories. From here, you can create a new product category with password protection. Write the product category name and slug (this will be used in the URL, so can be the same as the product name). You can also add a category description and thumbnail. Scroll down to the Visibility section at the bottom, and select Password Protected. Type in your password and click Add new category:
To edit the visibility of existing product categories, hover over the category you want to change and clicking Edit.
To categorize a product as password-protected, in the Edit Product screen, check the box next to the password-protected category:
WordPress password protect plugins
We've now covered everything you need to know to password protect any WordPress site or WooCommerce store! Let's recap each of the 6 ways to password protect WordPress:
- An entire WordPress website - using the Password Protected plugin or Coming Soon Page & Maintenance Mode plugin.
- Individual WordPress posts and pages - using the post/page visibility function native to WordPress.
- WordPress categories - using the Password Protected Categories plugin.
- An entire WooCommerce store - using the WooCommerce Private Store plugin.
- Individual WooCommerce products - using the product visibility function native to WooCommerce.
- WooCommerce product categories - using the WooCommerce Password Protected Categories plugin.
With many different ways to structure your password protected site, you'll no doubt find the perfect solution among these excellent WordPress password protect plugins.