Skip to content

Instantly share code, notes, and snippets.

@sebgates
Last active August 29, 2015 14:01
Show Gist options
  • Save sebgates/c2a7547da8c4be20f8ce to your computer and use it in GitHub Desktop.
Save sebgates/c2a7547da8c4be20f8ce to your computer and use it in GitHub Desktop.
Code for adding at the top of your .htaccess file to create encrypted password before wp-login.php
ErrorDocument 401 "Unauthorized Access! You need to provide valid credentials to login"
ErrorDocument 403 "Forbidden! You're not allowed to access this page."
<Files "wp-login.php">
AuthName "Administrators Only!"
AuthType Basic
AuthUserFile /home/username/wplogin
require valid-user
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment