WordPress resource site for WordPress Beginners with easy to understand WordPress tutorials for mastering the basics and beyond.

WordPress Guide

WordPress Guide

Making a WordPress Blog Completely Private

Make a WordPress Site Private With or Without a Plugin

Make a WordPress Site Private Without a Plugin

To access your Site Privacy options:

  1. Go to your blog’s dashboard.
  2. Click Settings to access General settings
  3. Scroll down to the Privacy section
  4. You’ll see three options: Public, Hidden, and Private. If you select “Hidden”, search engines will no longer link to your site but anyone who has the address of your blog will be able to see everything. Select Private to make your blog private.

Make a WordPress Site Private With a Plugin

  • First thing you need to do is install and activate the My Private Site plugin.
  • visit Settings » Private Site page to configure the plugin settings.

Make a WordPress site private without a plugin (advanced)

Make a WordPress site private without a plugin

Goto Appearance>>Theme Editor>>Theme Functions (functions.php)>>Paste this code

function make_wordpress_site_private(){

  global $wp;

  if (!is_user_logged_in() && $GLOBALS['pagenow'] !== 'wp-login.php'){
    wp_redirect(wp_login_url($wp -> request));
    exit;
  }

}

add_action('wp', 'make_wordpress_site_private');

How to make your WordPress site completely private So as we cover this you might be wondering why would I need to make my blog private. Well, some good features for that would be say an intranet site for your company or even if you just want your own private diary or journal area and you only want an accessible for yourself and no one else.

To get that functionality we’re going to install a plug-in called my private site. This is what it looks like from the repository and to do that we’ll just go into the back of our dashboard head over to the plugins area add new and i’m going to search for my private site this is the one we want so we’ll install now. Finally, let’s activate it and we’ll be ready to go into settings to configure.

You can either go here for settings or go under settings itself and go to a private site for future. You see up here you automatically get a notification that it’s not turned on so that’s okay we’re in here’s to turn it on. To make it private we’ll just click this and save changes.

Alright once we set that up you can also allow self-registration that way anyone can register and once they register they’ll have to log in before they can actually see the site. Down here you also can decide where to send them once they log in.

By default, it will just return them to the same URL. If you have a very specific page you can add that here if you want to set up a custom log in then you can select this here and add the login location here and then if you need to have visible exclusions meaning you want the site home to be visible for everyone to see and then they will have to log in to see the rest or for instance is the site visible to everyone.

You can click that here or will it just be visible to anyone who logs in. Now that we’ve made the site private click Save Changes. Once you save all the changes in order to see how it looks on your site you’ll want to go and log out. Once you log out and you try to access the site it will automatically take you to the login screen.

This is a good example of why you may want to show say the home page for anybody to look at it so they have an idea of what they’re doing. Once I log in I now see everything just fine.

Now if you’re just looking to make certain posts private well WordPress has a built-in functionality over here under visibility you see that it’s public is by default and you can either password protect it or make it private over here and when you make it private people who have an editor or above can see it once they’re logged in and that’s a quick overview on how to make your WordPress blog completely private.