WordPress Password Protect Page: 1 Native Method + Plugin
Sometimes we need to protect our WordPress website posts or pages from public access. A WordPress password protect page is a simple way to prevent access to these pages.
The creation of a WordPress password protect page for our website is a simple task. In this article, we will provide detailed explanations step by step.
We will create a WordPress password protect page with and without the plugin.
Why Create WordPress Password Protect Page.
Password protection is a feature that allows you to restrict access to your page or post content to only authorized individuals.
Using a password-protected page is a good idea for several reasons.
Sometimes we need to display our content to users who have subscribed to our services or registered on our website.
It is also helpful to protect the downloaded files. To provide support to our customers regarding software downloads, we can create a WordPress password protect page. We can provide a link to the download file from the password-protected WordPress page. If we provide a link to download the file through the WordPress password-protect page, we can protect it by only giving access to people who have paid for it.
Such a download file may not be crucial, but by using WordPress password protection, we can prevent unwanted downloads that prevent overloading our WordPress website.
By using the WordPress password protect page, we can restrict traffic from pages that are only for specific people or groups.
If a page is not fully functional or in progress and we want to test it, we can make it a WordPress password-protected page.
How to Add WordPress Password Protect Page Without Plugin
Creating a password-protected page in WordPress is an easy and simple task. First, we will add a post or page in the Gutenberg editor, then we will add the password to that page or post.
To Create a Password Protected Page in WordPress Follow the Steps below
1 Go to the left side pan in the WordPress dashboard, and click Pages.
2 Click the Add New Page.
3 Enter the page title.
4 Select Summary.
5 Now click Visibility.
6 Now select the radio button Password protected.
7 Enter your password for the page or post.
8 Click Publish.
Now your page has become password protected. You can add the page to the menu.
When you open password password-protected page it will ask for a password before displaying content.
How to Password Protect WordPress Site Using Plugin
Password-protecting our posts or pages can be done easily and quickly by using inbuilt password protection. However, it has limited options for safeguarding implementation. It is not possible to customize protection to meet your needs.
If you want to customize your options, you can use a plugin for password-protected pages and posts. In the upcoming section, we will provide instructions on how to use a plugin for password-protected pages and posts.
In this tutorial we will use the PPWP – Password Protect Pages plugin.
Install and Activate the Password Protect Page Plugin
Follow the steps below to install the WordPress Password Protect Page Plugin.
1 In the left pan of the WordPress dashboard click Plugins.
2 Now click Add New.
3 Search Password Protected.
4 Click Install Now, and after installation click Activate.
How to Setup of PPWP – Password Protect Pages plugin
The general setting of the PPWP plugin
1 In the left pan of the WordPress dashboard click Password Protect WordPress. By default, Settings are selected, keep it selected.
2 Now Select General.
3 By default post type page and post type post is selected. You can select any other type of custom post type using Post Type Protection.
4 Cookie Expiration Time is used to set the time for cookies. When some successfully log into the page, browser saves the user’s data in cookies. We can set this option when this data is experienced and the user has to login again on the page.
5 Whitelisted Role option used to set user role which needs no password to view the content of the page.
If we left it selected No one, then all types of users need to log in to the password-protected page.
6 Password Protect Child Page option only works in the pro version. This option allows you to protect all pages which are children of the main or parent page.
7 Protected Content Visibility lets you show how protected content is in RSS feeds.
8 This option allows not to include password password-protected page from this list. You can add or remove pages.
9 This option is also used not to include pages from this list. You can add or remove pages.
Setting up Advanced Option
10 Show Post Excerpt option used to show customize except for password protected page. Visitors can see this excerpt when come to this page.
11 Unlock Protected Content without Page Refresh option allows to use of Ajax to display the page without refreshing the page.
12 Click the Save Change button to save all changes. Otherwise, your change will lost.
Creating Master Passwords
Here you can create a master password that can unlock all individual pages, partial content on the pages, and custom post type, etc.
13 Select Master Passwords.
14 Click Add New and you will see a form popup with an input field, fill in your master password. After filling all fields click Add New.
Troubleshooting options
In this option, you can select the following options.
Entire site: This option allows password protect WordPress site entirely. If you select to protect the entire website, your website requires visitors to enter a password whenever they visit any pages.
If you’re in the process of creating content for your new website and feel it’s not yet ready to be published, it may be beneficial to protect the entire site with a password.
You can view the website after entering the correct password.
Individual Content: this option is used if we want to protect individual posts and pages.
ACP & WordPress Custom fields: this option is used to protect Advanced Custom Fields in WordPress.
Part of Content: this option is used if we want to protect partial content on a post or page.
Partial Protection Using Short-code
1 In the left pan of the WordPress dashboard in the Password Protect WordPress options click Partial Protection.
2 By default General is selected, keep it selected.
3 Click the button to use Short-code.
4 Click the Save Changes button.
Site-wide Protection (Password Protect WordPress Site)
1 In the left pan of the WordPress dashboard in Password Protect WordPress options click Site-wide Protection.
2 Click the Password Protect Entire Site option.
3 Enter the password for your website protection.
4 Click the Save Change button.
Integration of reCAPTCHA
1 In the left pan of the WordPress dashboard in Password Protect WordPress options click Integration.
2 By default reCAPTCHA, keep it selected.
3 Now select Enable Google reCAPTCHA Protection.
4 In this field select the type of reCAPTCHA, The options are reCAPTCHA v3, reCAPTCHA v2 checkbox, and reCAPTCHA v2 invisible.
5 Choose the form of password to apply reCAPTCHA.
6 Click the Save Change button.
5 Select the Configuration option to configure reCAPTCHA.
How to Add WordPress Password Protect Page Using Plugin
First, create a page or post you want to make a WordPress password-protected page.
Now follow the steps below.
1 Add the page or post title.
2 In the option Password protect WordPress click Edit.
3 Select Role, the role may be global, administrator, editor, author, contributor, subscriber
If you select administrator then only the administrator role person can access this page. If you want that anyone can access the page using a password then select global in the role field.
4 Enter the Password for the page.
5 You can select more than one type of role for a particular page as we already have made administrator and subscriber role types.
6 After filling title, content and selecting options click Publish.
Conclusion
Password protection on WordPress websites is a very useful option for security. By using a password, you have the ability to protect your content or limit access.
Password-protecting a WordPress site is an option to restrict users but not search engines.
The purpose of this article was to teach you how to implement and customize password protection options on a WordPress site. We have implemented protection using a plugin as well as the native features of WordPress.
We hope this article helps you password-protect your WordPress pages, posts, or entire website.
Related Posts
- How to Set WordPress Password Protected Page Cookie Timeout
- How to Create a WordPress Contact Form: 5 Benefits of Contact Form
- What is a Slug in WordPress: Change and Optimize WordPress Slug
- Navigation Menu : How to Add a Menu in WordPress
- WordPress Excerpt Length: How to Edit Post Excerpt in WordPress