There are many different plugins in WordPress Plugin Repository that allows you to limit your website access in different ways. Now this tutorial explains you limiting your WordPress site access for logged in or allowed by IP addresses.
Continue reading Quickly Limit WordPress Site Access To Logged-In Users Or Selected IP Addresses