Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Phlow
Last active August 17, 2022 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Phlow/0cbc56bb299447c7d13ec9c23ef2bc69 to your computer and use it in GitHub Desktop.
Save Phlow/0cbc56bb299447c7d13ec9c23ef2bc69 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