shopify traffic stats

How to Password Protect WordPress Admin Directory

Share on Pinterest

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.

How to Password Protect WordPress Admin Directory

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

Step 1:

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“.

Step 2:

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:

How to Password Protect WordPress Admin Directory

Step 3:

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.

securitysettingsforafolder

Step 4:

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.

Step 5:

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:

How to Password Protect WordPress Admin Directory

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.

Share on Pinterest

4 Comments

  1. Asif Khan
  2. Himanshu Rawat

Reply

Get the Updates
Get Exclusive Updates Directly in your Inbox.
Sign Up For Our Newsletter Today!
SIGN UP
Close

Get Latest Updates in Your Inbox.

Enter Your Email Below
Subscribe
GET FREE AUDIT