Protect WordPress Configuration wp-config.php File Using Htaccess
WordPress security has always been a concern and most of the users are still figuring this out. Have you ever thought to protect WordPress configuration wp-config.php file?
This is one of the most important files present in the WordPress directory which has all the authentication keys and connects your database with the rest of your website.
The wp-config.php file is responsible for handling many special aspects of your website. You may in need to edit the wp-config.php file for many reasons.
Protecting this file would be a plus point. In this post, you will learn the easiest way to block everyone to access this file using the .htaccess file.
Stop the Access to wp-config.php File Using a Simple Code
Most of the time, people fret a lot because of such technical things. I must tell you that to run a successful WordPress blog, you should learn these basic techie aspects.
You need to edit the .htaccess file. Do you know how and where is it present?
There are two different ways. If you’re using the Yoast SEO plugin you can just have to go to SEO>>Advanced and you will see “File Editor”.
It will take you to a new page where you can easily see the robots.txt and .htaccess files.
But if you’re using any other SEO plugin then you can use the cPanel of your web hosting account.
Go to cPanel>>file manager>>.htaccess file. Don’t forget to check the box to show the hidden files because the dot signifies that it’s a hidden file.