I created a wordpress site on my server and added a htaccess file with some accounts. Does that achieve the same thing?
Edit: i guess i could have used the free plugin "restrict user access" instead: https://wordpress.org/plugins/restrict-user-access/#i%20have...