Just would like to ask how can I restrict access to my WordPress site using .htaccess
file?
I have seen sites that teaches how to protect the admin side of a WordPress site like this one:
http://www.wpbeginner.com/wp-tutorials/9-most-useful-htaccess-tricks-for-wordpress/
But how about the entire site from the homepage itself?
Just follow the link that you posted and put this in the htaccess file in your document root:
except replacing the
AuthUserFile
with the path of the htpasswd file that you generated.That’s all.