Protect wp-config.php with .htaccess – WordPress Code Snippets
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 </files>