Restrict access to wordpress site using htaccess

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:

Read More

http://www.wpbeginner.com/wp-tutorials/9-most-useful-htaccess-tricks-for-wordpress/

But how about the entire site from the homepage itself?

Related posts

1 comment

  1. Just follow the link that you posted and put this in the htaccess file in your document root:

    AuthUserFile /dev/null
    AuthGroupFile /dev/null
    AuthName "WordPress Admin Access Control"
    AuthType Basic
    Require valid-user
    

    except replacing the AuthUserFile with the path of the htpasswd file that you generated.

    That’s all.

Comments are closed.