In this article we will learn how to secure our wordpress blog using some .htaccess technique. Of course there is no system perfect in this world. Everything should have bug, no matter it’s high or low risk. When last time you have seen blog with wordpress got hacked? Well, This happen to me 3 times on one of my crazyporn blog. The hackers always controlling my admin panel and it’s happen 3 times until I playing with my new toys to stop this guy.
What is .htaccess? In several web servers (most commonly Apache), .htaccess (hypertext access) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. Read full in wikipedia. Back to the topic what should we do to stop hackers controlling our admin area?
There is lots of technique, what I write in here just some technique using .htaccess files:
- Protected your wp-login.php files.
- Protected your wp-config.php
- Protected your wp-comment-post.php
- Protected .htaccess file.
<Files wp-login.php>
Order deny,allow
Deny from All
Allow from xxx.xxx.xxx.xxx
</Files>
Where xxx.xxx.xxx.xxx is your IP, if you meet problem to know your IP just look on IPchicken.com
Wp-config is vital configuration files for wordpress, it should secured to stop people viewing it’s content.
<files wp-config.php>
order allow,deny
deny from all
</files>
Even if you’re using Akismet plugins, to reduce spambot post via remote access you can use this code. (Change yourblog.com with your own domain name)
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
This code will protect all files with “.hta” string on it.
<Files ~ “^.*\.([Hh][Tt][Aa])”>
order allow,deny
deny from all
satisfy all
</Files>
After using this tips the hackers can’t controlling my wordpress admin panel again hahaha! he try to inject using wordpress bug but when I limited IP to access admin panel he’s cry *lol* yay, I win! finally I beat this noob *lol*
SIMILAR POST :
- Playing with .htaccess file
- Stop bandwith thief using rewrite rules on .htaccess file
- PHP: Show Beauty Ads Inside Your WordPress Article
- How to:Configure/Setup Your VPN(server side) on Windows Server 2003 R2
Incoming search terms:
- inkaso instrukcija
If you're new here, you may want to subscribe to my RSS feed. You may copy or publish this article to your blog or other site as long you give credit link back to this site article. Thanks for visiting my blog!
6 Responses to “Secure Your WordPress, Playing With Your .htaccess File.”
Trackbacks
- http://www.aforexcurrencytradingsystem.info
- Tips & Tricks - It's Time to take back our Freedom!!! - givebackourfreedom.com






Did you know?
Tag cloud
Blogs Statistic
Subscribe my feed

December 30th, 2009 at 12:05 PM
This blog is great! Thanks for your hard work on it.
January 7th, 2010 at 5:39 AM
Been playing with htaccess files actually.. these are pretty handy
January 11th, 2010 at 10:37 PM
Thank you so much, there aren’t enough posts on this… or at least i cant find them. I am turning into such a blog nut, I just cant get enough and this is such an important topic… i’ll be sure to write something about your site
February 24th, 2010 at 11:34 AM
Hey man thanx for the info. it’s great!!
I will follow your instructions
Greetings from Mexico City