Protect Your wp-config.php With .htaccess in WordPress

This is a very quick tutorial which let you know how to protect your wp-config.php file from hackers by using the .htaccess file in your WordPress website. The wp-config.php file has very critical information of your website like database connection information.

wordpress-hacks

Protect Your wp-config.php with .htaccess in WordPress

Open the .htaccess file from root directory of your server and add the below code at the end of the file and save it. below code will prevent access to your wp-config.php file.

Download WordPress Security Guide eBook and Protect Your WordPress Site

I have written an eBook to protect your WordPress website from hackers/attackers by implementing the security guidelines with your site. If you are a serious WordPress developer OR WordPress website owner, then you must implement the Security Guideline in your WordPress website. It will help you to protect from hackers/attackers.

wordpress security guide

If you like this tutorial, then do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , , , ,