Skip to content

Instantly share code, notes, and snippets.

@tux255
Last active August 13, 2017 09:27
Show Gist options
  • Save tux255/b66e14bacaff0a41ba0b1848ae195197 to your computer and use it in GitHub Desktop.
Save tux255/b66e14bacaff0a41ba0b1848ae195197 to your computer and use it in GitHub Desktop.
Securing Your WP-Config File
# Protect wp-config.php
<Files wp-config.php>
order allow,deny
deny from all
</Files>

As you can see, this file is SUPER IMPORTANT therefore it needs extra security. By default it is located in the root WordPress folder, but you can move it. It can be moved outside your public_html directory, so users cannot access it. WordPress knows by default to look in other directories, if the files is not found in the WordPress root folder. You can also use .htaccess file to limit access to this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment