Skip to content

Instantly share code, notes, and snippets.

@quinns
Created October 27, 2016 20:05
Show Gist options
  • Save quinns/a4987432d2dcc3a3b85a868f5e0ae1e0 to your computer and use it in GitHub Desktop.
Save quinns/a4987432d2dcc3a3b85a868f5e0ae1e0 to your computer and use it in GitHub Desktop.
protect wp-login.php with http basic auth
<Files "wp-login.php">
Order Deny,Allow
Deny from All
# allow certain whitelisted IPs
Allow from localhost 123.456.789
AuthName "Authentication required!”
AuthType Basic
AuthUserFile /path/to/passwd-file
require valid-user
# Allow password-less access for allowed IPs
Satisfy any
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment