Last Updated: February 25, 2016
· mkdizajn

Make Wordpress visible to only logged in users

To make some site that is publicly available on,, for ex: address:

only visible to admin roles or developers while working on site online, open your index.php in your active theme and somewhere on the top of that file add next line:

if( ! is_user_logged_in() ) exit ;
// rest of the theme calls..
// ...

after that, only logged in user will see developement site, and all others, including web crawlers will see beautiful white canvas :)

cheers, k