When and How to Password Protect Your Entire WordPress Website
June 2nd, 2017 | by Ravi Chahar || 2 Comments |
Do you want to password protect your entire WordPress website? Do you even know what does that even mean? It’s quite similar to password protecting your admin directory but not the same.
One of our readers asked whether it’s possible to add another barrier by adding a username and the password to a complete website.
This concept comes into the light when web developers and designers started to use the live website to showcase their work portfolio.
They design a website and password protect it along with discouraging the search engine to index. In this tutorial, you will learn the easiest way to password protect your entire WordPress website.
NOTE: It’s not recommended for your regular website
PUBLIC_HTML Directory is What You Need
As you all know, the data of your WordPress website is stored in the root directory. Whether you have added it as an addon domain, subdomain or moved to any folder, it will be available in this directory.
It means if you want to password protect your website, you have to do it with this directory.
To do so, you have to follow a few steps
Step 1: – First of all, login to the cPanel of your web hosting account. Depending on the cPanel provided to you, you have to search for the “Directory Protection”.
It can be Directory Privacy, Password protect directories or similar. The concept is to find an icon which can take you to protect the directories.
Step 2: – Once you find such icon, click on that and you will be redirected to a new page. You will see the list of directories which can be password protected.
Click on the public_html folder.
Step 3: – On this page, you will see a check box to protect this directory and enter the name of the directory. You have to create a new user so that only a few individuals can visit your website using those credentials.
Make sure, you use a strong password which is always recommended. A weak password is prone to get hacked.
After filling all the credentials, save the settings and you’re all set.
You have successfully password protected your whole website. From now onward, no one can visit your website without a username and the password.
An Alternative to Access the PUBLIC_HTML Directory
Some of you may get confused when you don’t find the directory privacy, password protect directories icon in the cPanel.
To make it easier, I have a different solution for you. Just open the file manager.
NOTE: Open the main directory instead of the root directory.
It will show you all the folders which are available on your web hosting. Look up for the public_html folder.
Right click on that folder and you will see an option to “Password Protect” this directory. Once you click on that folder, you will reach to the same page as you saw in the previous method.
It will show you all the same fields to generate credentials for a new user along with a password.
Just like before, fill the details and save settings.
I Am Sure Now You Can Password Protect Your Entire WordPress Website
The decision of password protecting your website should be taken only if you want to show it to some specific people.
It’s because once you accomplish this, no one would able to read the content of your website. As discussed before, it’s good only if you want to showcase your skills.
People need to read the tutorials you provide, and no one can know the login details.
Before you password protect your entire WordPress website, you should know what you’re really going to do. If you still have any doubt, feel free to drop a comment.