Posted By

josephknight on 07/05/10


Tagged

php html wordpress htaccess security config


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

artificialid
mikoli
srdjan


WordPress - .htaccess - protect config file


 / Published in: Apache
 

The problem As a WordPress user, you probably know how important the wp-config.php file is. This file contains all of the information required to access your precious database: username, password, server name and so on. Protecting the wp-config.php file is critical, so how about exploiting the power of Apache to this end?

Code explanation .htaccess files are powerful and one of the best tools to prevent unwanted access to your files. In this code, we have simply created a rule that prevents any access to the wp-admin.php file, thus ensuring that no evil bots can access it.

Source

* 10 Easy Ways to Secure Your WordPress Blog
  1. <files wp-config.php>
  2. order allow,deny
  3. deny from all
  4. </files>

Report this snippet  

You need to login to post a comment.