🎉🎉🎉 Introducing Fluent Forms v3.0, Grab Lifetime Unlimited Site License with 50% Discount!Buy Now

How to Secure Your WordPress Configuration File

You know, in WordPress, the wp-config.php file is the most vital file for WordPress settings. By default, it’s located in the initial folder which is the root directory of the WordPress folder. The thing is you can move it anytime and even you can move it outside your public HTML directory so that your users can’t access it. WordPress by default can look in other directories if it doesn’t find any file in the root directory.

You can add the following code to your .htaccess file to minimize your user’s accessibility to your directory.

Configuration File

This is how you can secure your WordPress configuration file. Hopefully, this pro-tip was helpful. Find more Pro-tips here.

Sazzadul Bari

Sazzadul Bari is a digital marketing strategist at WPManageNinja and also the man behind BlogCD, specializing in content writing and lead gen. He loves to play with words and has a flair for writing on a variety of topics. He is an avid cricketer, a lover of everything entrepreneurship, and a keen reader of Francis Bacon's essays.

Leave a Reply