Back WordPress

How to Secure WordPress From Being Hacked

WRITTEN BY ON 14 Aug 2012
8,081 VIEWS • SHARES
2 comments

Securing WordPress is a big issue these days. A lot of sites/blogs get hacked on daily basis. How to secure WordPress from being hacked is what you will learn in this article. You will have to add some code snippets which will do the work for you.

PHP

This code will stop any bad request to you wpconfig.php file through .htacess. Goto your cpanel >> File Manger >> Root Folder in which look for .htaccess file, open it and add this at the end

# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>
Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.

2 comments
Sam 12 years ago
You should try ogeek dot com. They offer secure websites that cannot be hacked. They are a much better overall than WordPress.
Reply
Max Pen 10 years ago
Very useful snippet. Thanks.
Reply