Recently, I have written a tutorial on “How to install WordPress using Fantastico”. Now, I hope that you all know how to install WordPress. After installing WordPress, now its the time when we have to think about security and how to protect our blog from malicious attacks and deface attacks. WordPress do not provide security automatically, we have to take some measures to prevent our blog/website from being Hacked.
So, today we are traversing towards the first step of security by showing tutorial on “How to Password Protect WordPress Admin Directory“. WordPress Admin Directory is nothing but a “wp-admin”, which enables you to login in to the WordPress. By protecting this directory you will cover an extra layer of authentication for security purposes. So, in this article we will show you a Step by Step guide on “How to Password Protect WordPress Admin directory“.
Step by Step Guide on:
How to Password Protect WordPress Admin Directory
Login to your cPanel. Scroll down the screen and find section which includes title as “Security” and in that section you will find an icon named as “Password Protect Directories“.
Click on that icon and then screen will be appear asking for directory location. Now, click on web root and then navigate to the folder where your WordPress is hosted. Then click on the /wp-admin/ folder. You will see a screen similar to below image:
Afterwards, in that open screen you have to simply check the box to Password Protect WordPress Admin Directory and in “Name of the protected directory” – you can put desired name of your choice and no need to remember that name.
Then, in that open screen only you have to fill “username & password” and you have to remember it. Hurray! You have enabled Password Protect WordPress Admin Directory.
Now, When you try to login in WordPress or when you try to access your wp-admin directory, then you will see an Authentication Required box, shown in figure below:
To Fix Too many redirects loop error
Sometimes it may happen that after after you have Password Protect WordPress Admin Directory, when you try to login in to WordPress account then it will show “404 Error or Too many redirects loop error“. To fix this issue, open your main WordPress .htaccess file (cPanel > File Manager) and add the following code there before the WordPress rules start.
ErrorDocument 401 default
And your problem will be solved, now try to login in to WordPress account.
Hope you have understand and now you can Password Protect WordPress Admin Directory, if you have any problem then don’t hesitate, just put your problem related comment via below comment form and we will surely help you resolve your problem.