How to Protect wp-config.php file in WordPress with .htaccess

0
3
views
If you know about the Wp-config.php file then I’m sure you know that how much important it is.
And for those who don’t know, In wordpress wp-config.php is the file which holds all critical information about database, including username, password, host and database name.
So make yourself safe from hackers by protecting it by using the .htaccess file.

Simply add the following lines in the .htaccess file

<Files wp-config.php>

order allow,deny

deny from all

</Files>

Facebook Comments

Read  Social Timeline for Wordpress

Leave a Reply