Use htaccess To Protect The wp-config file

Programming for Search Engines 101. An area for avid PHP and .NET developers to chat about Programming techniques and how to make better use of search engines.

Moderator: Moderators

Use htaccess To Protect The wp-config file

Postby vineethc » Thu Jan 24, 2013 8:07 am

As we all know in Wordpress,wp-config file is an important file which contains information about database name,database username,password and so on.So protecting the wp-config file is critical and could be done using the htaccess file.

For this simply add the following code in the htaccess file :
1. <files wp-config.php>
2. order allow,deny
3. deny from all
4. </files>
vineethc
 
Posts: 10
Joined: Tue Jun 19, 2012 2:37 am
Tell us why you would like to become a WyseLabs Member:

Return to Programming

Who is online

Users browsing this forum: No registered users and 8 guests