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:
<?php
if( ! is_user_logged_in() ) exit ;
// rest of the theme calls..
get_header();
// ...
after that, only logged in user will see developement site, and all others, including web crawlers will see beautiful white canvas :)
cheers, k
Written by kreso
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Wordpress
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#