WordPress is precious for every WordPress bloggers because their all precious hard work depends upon WordPress files. But unfortunately their are many hackers present which are in continuous try to hack others blog just for fun. To save your blog from WordPress hackers you need to take some solid step which assures security of your blog.
In previous article I told you about WordPress file monitor WordPress Plugin which secure your blog by continuously monitoring WordPress file. Now I am telling you a very secured way to save your blog from hackers. You can restrict your WordPress admin usage according to giving right to certain IP addresses.
To use this method you need to bring few changes in your .htccess file. If you don’t know what is .htaccess file, you don’t need to worry about that. But first you need to select those IP addresses which you are going to allow for your WordPress admin access. You can easily find your IP address on IP-Address.
Note: If you have a multiple author blog then it may be very difficult to know everyone IP. Also if your IP is dynamic(changing time to time) then this is not a smart process for you. So avoid using this technique in those two cases.
.Htaccess Part
You can find .htaccess file on the root of your blog directory. Open your FTP client. I use Filezilla for that purpose. Login and look at the public_html folder. You will find .htaccess file inside it.
If you don’t find any .htaccess file inside the root folder, you don’t need to worry about that. You can easily create a .htaccess file with the help of notepad editor.
To make a .htaccess file, open a notepad and insert following code:
<Files wp-login.php>
Order Deny, Allow
Deny from all
Allow from xx.xx.xx.xx
</Files>
Now edit this code by inserting your IP address in place of xx.xx.xx.xx. You can also add more IP addresses by adding a new line in the code. In the new line you have to write “Allow from xx.xx.xx.xx” and add any other IP address. So the new code looks like
<Files wp-login.php>
Order Deny, Allow
Deny from all
Allow from xx.xx.xx.xx
Allow from xx.xx.xx.xx
</Files>
Now save this code as .htaccess name. Note that don’t save the file in .txt format. Always save in .htacces format. Now after saving upload it to your WordPress root folder. If your wordpress root folder already contains a .htaccess file then open the file and simply paste the code in the file.
Now look at the wp-admin folder. If it contains .htaccess file then open it and paste the following code inside it:
Order Deny,Allow
Deny from all
Allow from xx.xx.xx.xx
Do the same process you have done in above step and add the .htaccess file to wp-admin folder. If your wp-admin folder doesn’t contain any .htaccess file then create a new file in a text editor, paste the code and rename it with .htaccess file and upload it inside wp-admin folder.
So your both the upload are finish. Now your WordPress is safe from hackers now. If you find any difficulty kindly ask it in a comment section.
Subscribe to Blogtechnika for more updates. Follow me on Twitter @techim.
{ 9 comments… read them below or add one }
Good post himanshu yes blog security is first thing, thanks for sharing buddy
.-= MostlyBlog´s last blog ..Microsoft launches MSN Juku :A twitter like service powered by Windows Live Messenger =-.
Good Post sadly blogspot users cannot be saved from hackers…
.-= Lucifer@Blog Contests´s last blog ..Chance To Win Laptop & IPod =-.
Sounds Great, but i cannot implement as my ISP gives a dynamic IP.
.-= Ramkumar´s last blog ..Visual Studio 2010 is faster than 2008 =-.
same here .. dynamic ip people have no option
.-= Jaspal´s last blog ..100+ facebook apps for productivity and tools for achieving all your goals =-.
Really unique plugin.All bloggers must use this plugin for security of there blog.
.-= Shivaraj´s last blog ..Phones without IMEI number will not work in India from December 1. =-.
Thanks for sharing. All bloggers want security for their blog .
.-= Ruchi´s last blog ..Twitter Myths =-.
If there are multiple authors is there a way through the stats panel on the server or some other means to find the IPs of the authors?
I didn’t thought my IP was dynamic and I did IP restriction. How can i remove IP Restriction from cpanel. I tried from .htacces but this file can’t edited.
It gives me an Server Internal error when adding the code to main .htaccess. Is it secure without adding the code below?
Order Deny, Allow
Deny from all
Allow from xx.xx.xx.xx
{ 2 trackbacks }