Become Wordpress Professional - Your Ultimate Wordpress Guide

Tuesday, 19 March 2013

How to Block Unauthorized access to WordPress Admin Area

Blocking Unauthorized access to wordpress
In this tutorial you will learn to improve security by learning how to block unwanted access to the WordPress Admin Directory. This will done by using the small slice in .htaccess code which provide strong flexible protection against malicious behavior.

Go to your Online Web Host Cpanel account and open site directory looking a file in default WordPress installation here is the directory that have to be protected and that is wp-admin mostly because it contains sensitive functionality. To secure this directory create a new blank .htaccess file in wp-admin directory. Next open the file and copy and paste the following code

# SECURE WP-ADMIN
<FilesMatch ",*" >
Order Deny,Allow
Deny from all
Allow From ( Here is your Static IP Address)
</FilesMatch>

Example : If your IP Address is 132.128.987 then your code will be 

# SECURE WP-ADMIN
<FilesMatch ",*" >
Order Deny,Allow
Deny from all
Allow From 132.128.987
</FilesMatch>

Your IP information is available at www.whatismyip.com. Check your IP by visiting the website and copy and paste in your code and save the file. Now with that all requests that are not from your IP address are going to be denied to anything in admin area. All set now but there are couple of things keep in mind.

  1. If you are not able to work with .htaccess file you may want to check with your web host and most setup these days is pretty easy to password protect directories for your server control panel.
  2. You can always add other IP addresses and allow multiple access like so. Simply copy and replicate the line and replace the IP address with other IP address such as mobile and other Internet access for which you like to give access in admin area. 
After this tutorial you are able to better secure your WordPress admin area by protecting the file in WordPress admin directory with IP access.

0 comments:

Post a Comment

Please Avoid Spamming. Comments will be moderated before they are published.