Skip to content

Instantly share code, notes, and snippets.

@williameliel
Created January 19, 2017 16:48
Show Gist options
  • Save williameliel/ff2e678d88738da9386aa85a086f5112 to your computer and use it in GitHub Desktop.
Save williameliel/ff2e678d88738da9386aa85a086f5112 to your computer and use it in GitHub Desktop.
Password-protect wp-admin/.htaccess
AuthType Basic
AuthName "WordPress Protected Area"
AuthUserFile /path/to/admin/passwords
Require valid-user
<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
</Files>
<Files "\.(css|gif|png|js)$">
Order allow,deny
Allow from all
Satisfy any
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment