WordPress login wp-admin protect with .htaccess
1: create a .htaccess file
<Files ~ “^\.ht”>
Order allow,deny
Deny from all
</Files>
# Protect wp-login
<Files wp-login.php>
AuthUserFile /path to your wordpress site/.htpasswd
AuthName “Private access”
AuthType Basic
require user [username in .htpasswd file ]
</Files>
2: generate .htpasswd file