If you’re building up content for your new website and feel like it’s not ready to publish yet, you might want to password protect the whole site. It means that visitors are required to enter a password whenever visiting any pages on your website. Once they input the right one, they can access every page without restriction.
In this article, we will walk you through some simple steps on how to achieve that with the Password Protect WordPress (PPWP) Pro plugin.
- Password protect the entire site
- Redirect users after login
- Display sitewide password form in sidebar
- Customize password form
- For PPWP Lite & PPWP Pro version 22.214.171.124 and lower
- Compatibility with other plugins
Password protect the entire site
Step 1: Navigate to Password Protect WordPress >> Sitewide Protection submenu from your admin dashboard.
Step 2: Turn “Password Protect Entire Site” ON, you will see a text area allowing you to input multiple passwords at the same time.
- Each password is spaceless and limited to 100 characters.
- Blank lines will be removed automatically.
After saving the passwords, go to any page on your website and you will see a password form as the image below:
Create new passwords
Unlike previous versions, the sitewide protected password is no longer hashed. It means that all created password will be visible to you, or those authorized to access the settings page, such as Administrators.
To change or delete the passwords, go back to the plugin’s settings page and simply update them under the text area. Don’t forget to save all your changes.
As a result, those who have access to your website via the previous password have to re-enter the password again.
In case you don’t change the password, visitors will be able to access your site until cookies expire. The default expiration time is 7 days and can be modified under Cookies Expiration Time option.
Bypass password sitewide protection
You can bypass password sitewide protection by either generating access links, excluding specific pages, or whitelisting specific roles.
Redirect users after login
Since Pro version 1.1.4, you can define where users are redirected after unlocking your sitewide protection.
Users will be redirected to specific URLs, e.g. pricing page or features page, according to the entered password.
Display sitewide password form in the sidebar
PPWP Pro version 1.2.0 comes with a simple shortcode allowing you to display sitewide password form in any location on your site.
You can use it to show password form in sidebar widgets, Gutenberg blocks, or page builder plugins’ elements.
Customize password form
Our plugin allows you to customize the default password form quickly and easily using WordPress Customizer. You can add a headline, edit the description, change the default logo, and more with live updates.
For PPWP Lite & PPWP Pro version 126.96.36.199 and lower
Step 1: Navigate to PPWP Settings Page and switch to “Entire Site” tab
Step 2: Enable the “Password Protect Entire Site” option and set a password, then click “Save Changes”.
Because the password will be hashed after you click on “Save changes” button, you should save it somewhere manually to avoid forgetting it. There will be no way to help you recover your old password in this case except creating another one.
Migrate sitewide protected passwords
If you upgrade from Free to Pro version, our plugin will migrate the hashed password automatically. Sitewide protection is kept and people who have entered password will be able to access your site until the cookie expires.
Compatibility with other plugins
PPWP uses WordPress “template_redirect” hook to render the password login form. So this might cause potential conflict with other plugins on your site that are using this hook too. You should know the priority of each plugin to understand how they work together.
For example, if you use PPWP and Protect WordPress Pages and Posts (PPP) plugins at the same time, the PPP will have priority over the PPWP.
In other words, when a user accesses a page protected by both plugins, PPP will firstly check if this user has permission to see the content. If not, the user will be redirected to a “No Access” page immediately and PPWP will take no role in this case.
On the other hand, if the user is granted permission to access the content, PPWP will receive PPP’s result and check whether the user has to enter the password. If yes, it will show the user a password form.