Top 5 htaccess Hacks for Securing your WordPress blogs from Hackers
|
Now a days hackers are more concentrating on WordPress Hacking as WordPress blogs are much more vulnerable to it. I have also written an detailed post on How to secure your WordPress blogs from getting hacked previously. Now today I am going to tell you some best 5 htaccess hacks 2012 to secure your WordPress blogs from getting hacked by the hackers. You can find your .htaccess file in your web root directory. So lets Have a look and don't edit or play with these mentioned codes below.
What is .htaccess file?
A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration.
Best 5 htaccess Hacks to Secure your WordPress blogs in 2012:
1. Securing wp-config.php file
# protect wp-config.php
<files wp-config.php>
Order deny,allow
Deny from all
</files>
2. Protect your WordPress blogs against SQL injection
# protect from sql injection
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
3. Disable Directory Browsing
# disable directory browsing
Options All -Indexes
4. Protect your .htaccess file from hackers
# STRONG HTACCESS PROTECTION</code>
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
5. Protect wp admin files
# deny access to wp admin
order deny,allow
allow from xx.xx.xx.xx # This is your static IP
deny from all
Keep Note- The above listed code will prevent browser access to any file in these directories other than “xx.xx.xx.xx” which should be your static IP address. That's it!
How to Use these Codes?
All you have to open and edit/update your .htaccess file with these above mentioned codes one by one. After adding codes, click on save button and exit. Enjoy Better WordPress Security Now!
Join me on Google+
|
Respected Readers :-
|
E njoyed this post very much – So why not you Subscribe to our regular Email Updates ! and stay connected with us forever .
Thank you for the tips! Securing wordpress should be done after you installed wordpress. This will prevent your site from getting hacked.
ReplyDelete