Having a blog on wordpress, teaches me how to avoid hackers. Hacking !! yes, as a owner of a blog you may hacked anytime. Hackers are really talented guys, they have very good idea about networking and computer programming. They know the best approach to hack a website in a short time. Doors are made to break but the most durable door is the good one. So it’s better to ensure good security on your wordpress blog, so that the hackers have to spend lot of time to crack it. Usually, they don’t spend long time to hack a website without purpose. Here, I would like to share some good security approaches.
1. .htaccess file :
Using .htaccess file is a very good practice. wp-config.php is one of the most important files in wordpress. You need to secure this file well. You can change the file permission to 440. Sometimes I get confused when I do a lot of work with wp-config.php file, I forget to change the file permission to 440 after finishing my editing. So I prefer to use the .htaccess file to get rid of mistakes. You can simply add the following codes in .htaccess :
<files wp-config.php> order allow,deny deny from all </files>
You should also restrict the hacker to access to wp-include folder by adding the following codes on .htaccess.
# Block the include-only files. RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] # BEGIN WordPress

