How add IP restriction for access to wp-admin login page through htaccess file : WordPress


Hello Friends.

Hope you are doing well!!

As you know there days hacker can easily hack wordpress site admin because generally we used common username/password of access to admin (i.e admin/admin123, admin/123456). I am here going to describe you how you can restrict wp-admin login page only for few IP address using htaccess file. I am sure IP restriction will make more secure your wordpress admin, after add IP restrict code no other user can access your site login page.

You will need to add given below code into your root htaccess file and update your IP address

# IP restriction code
<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from 000.000.00.00
Allow from 000.00.0.000
</Files>

Now create a new htaccess file under wp-admin folder and paste given below code and update your IP address

# IP restriction code
Order Deny,Allow
Deny from all
Allow from 000.000.00.00
Allow from 000.00.0.000

I have already created a wordpress plugin “Protect WP-Admin” for make admin more secure, You can use my plugin on your wordpress site.

Advertisements

Sr. Software Engineer

Tagged with: , , ,
Posted in Wordpress
One comment on “How add IP restriction for access to wp-admin login page through htaccess file : WordPress
  1. Bridget says:

    Thanks for this – been reading heaps of walk throughs on this, and this was the only one that worked correcty

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: