Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ValeriiVasyliev/f087f879e63d51b5241653e8984df147 to your computer and use it in GitHub Desktop.
Save ValeriiVasyliev/f087f879e63d51b5241653e8984df147 to your computer and use it in GitHub Desktop.
Harden your WordPress and hide wp-config.php and .htaccess for attackers.
# Prevent wp-config.php and .htaccess
# from being accessed use this code
<Files wp-config.php>
order allow,deny
deny from all
</Files>
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Prevent Directory Browsing
Options All -Indexes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment