Protect wp-config.php with .htaccess

How to Protect wp-config.php with .htaccess

in Security
Google+ LinkedIn

To tighten security of your WordPress blog/website, you should prevent direct access to wp-config.php file. You can prevent this with htaccess. Adding this simple code to your .htaccess file will prevent unauthorized access to your wp-config.php file.

# Disable direct access to wp-config.php
<files wp-config.php>
  order allow,deny
  deny from all

Share the love

If you like this snippet, share it with others!

Leave a Reply

Your email address will not be published. Required fields are marked *