Connect with us

Create your own private Twitter site using WordPress


Create your own private Twitter site using WordPress

With the incredible popularity of Twitter theses days, many people are asking themselves how can they create their own Twitter-like network for their family, friends or company. This may be a lot easier than you think. In this tutorial, I’m going to show you how to do it easily, using WordPress.

Getting ready

Twitter success is the proof, microblogging is definitely something useful and efficient. It can help you staying tuned with friends, family or coworkers.

While Twitter is great, it may not be the best choice if you’re looking for a private network, for example for sharing work tips with colleagues, or notice your family about what’s up.
As I was searching for an easy and quick way to create a private microblogging website, I stumbled upon an open source app called, which was created to allow people to launch their own private “Twitter like” microblogging sites. I didn’t really liked it and it was a total pain to install.

After this not so good experience, I decided that WordPress should do that job, and do it good as always.
P2 Theme

Let’s do it!

Well, enough talk for now! Let’s create our own, private microblogging website using our beloved WordPress.

1. Installing WordPress

The first thing to do is obviously to install WordPress on your server. Installing WordPress is definitely easy and and I’ll not explain it here due to the incredible amount of tutorials you can find on the internet.
If you need help for installing WordPress, you should read the documentation.

2. Get your copy of the P2 theme

The guys from Automattic (The company behind WordPress) released, some time ago, a very cool WordPress theme for social microblogging. The theme is called P2 and you can get it for free here – it was not updated for a while now, but don’t worry, it can still do this job for us.

After you downloaded P2, simply uncompress the archive and upload it to the wp-content/themes directory of your WordPress install. Once done, login to your WordPress dashboard and go to “Appearance”, “Themes”. Select the P2 theme and activate it.

P2 Theme
That’s easy as that, you have successfully installed P2 and you’re ready for social microblogging.

3. What about a login form?

Although the P2 theme itself is very good, it is possible to enhance it even more. As P2 allow users to post directly from the frontpage, without visiting WordPress dashboard, a good idea should be to integrate a control panel in the theme sidebar.
Our control panel will do the following:
If the user isn’t logged in or have no account yet: We’ll display a login form as well as a link to register, so the visitor can create his account.
If the user is already logged in: We’ll display a link to logout as well as a link to account options, so the user (Even if (s)he doesn’t know much about WordPress) can easily update his/her profile.

To integrate a login form in your theme sidebar, simply open the sidebar.php file and paste the following code:

  <?php global $user_ID, $user_identity, $user_level ?>
  <?php if ( $user_ID ) : ?>
    <h2>Control panel</h2>
	   <li>Identified as <strong><?php echo $user_identity ?></strong>.
		  <li><a href="<?php bloginfo('url') ?>/wp-admin/">Dashboard</a></li>

			<li><a href="<?php bloginfo('url') ?>/wp-admin/profile.php">Profile and personal options</a></li>
			<li><a href="<?php bloginfo('url') ?>/wp-login.php?action=logout&amp;redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>">Logout</a></li>

         if (is_single()) {?>
           <li><a href="<?php bloginfo('wpurl');?>/wp-admin/edit.php?p=<?php the_ID(); ?>">Edit Post</a>
         <?php } ?>


  <?php elseif ( get_option('users_can_register') ) : ?>
      <form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
        <label for="log"><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /> User</label><br />
        <label for="pwd"><input type="password" name="pwd" id="pwd" size="22" /> Password</label><br />
<input type="submit" name="submit" value="Login" class="button" />
        <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><br />
        <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
      <li><a href="<?php bloginfo('url') ?>/wp-register.php">Register</a></li>
      <li><a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Recover password</a></li>
<?php endif; ?>

4. Making your network private

While the login/register form option can be good in some case, it will still allow people to read your discussions and search engines to index your content. If your need is a 100% private website, don’t worry. This is far from being a problem.
To do so, we’ll use a WordPress plugin, named Private WP. Get your copy here. Once you have it, extract the archive on your hard drive and upload the private-wp to the wp-content/plugins directory of your WordPress install. Then, simply login to WordPress, go to the dashboard, then to “Plugins” and activate the plugin.

That’s all you have to do. Now, your website will automatically detect logged in users, who’ll be able to read and post content, and unknown visitors, who’ll be automatically redirected to WordPress login panel.


The first thing which have to be said is that, one more time, WordPress show how extensible and powerful it is. If you’re familiar with WP, creating this “Twitter-like” site using the P2 theme should not take you more than 30 minutes. Isn’t that great? I’ll not say that I love WordPress, because all of you already know 😉

This tutorial was focused on making a private microblogging site and used only basic techniques, but there’s a lot of other interesting things that can be done in order to enhance this “Twitter-like” site. For example, you may want to create a page template listing all members, or even better, filtering posts to see only those posted by a selection of members?
Maybe we’ll see that in a future tutorial, if you enjoyed this one.

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in business

About Me:

Szabi Kisded

Hey there, I'm Szabi. At 30 years old, I quit my IT job and started my own business and became a full time WordPress plugin developer, blogger and stay-at-home dad. Here I'm documenting my journey earning an online (semi)passive income. Read more

Sign up for my newsletter and get the YouTube Caption Scraper WordPress plugin for free
(worth 29$)!

All My Plugins In A Bundle:

My AutoBlogging Plugins:

My Online Courses:

A Theme I Recommend:

Featured Posts:

To Top