Skip to content

Instantly share code, notes, and snippets.

@szbl
Created April 17, 2013 14:04
Show Gist options
  • Save szbl/5404561 to your computer and use it in GitHub Desktop.
Save szbl/5404561 to your computer and use it in GitHub Desktop.
Lock down your /wp-admin/ directory with an .htpasswd file.
#
# Require a password
#
AuthName "Admin Login"
AuthUserFile /home/user/path/to/.htpasswd
AuthType basic
require valid-user
#
# Allow admin-ajax.php to work
# without HTTP authentication
#
<Files admin-ajax.php>
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