Plugin : Registered Users Only

Update: Please get the plugin from the repository. You can file bug reports there as well. It makes it a lot easier for me to manage the plugin’s development.

I was gonna call this plugin “Bouncer” but settled for a more explanatory name instead.

This plugin will allow only registered users of your blog to view the blog. If you have a wordpress powered blog that you don’t want your parents, or the secretary in your office, or the POTUS, to read it(okay, well, I can’t guarantee the last one :P ), then View source and save or Download the .zip file to start using it. This will effectively password protect your wordpress blog, and also prevent search engines from indexing the pages in the blog.

Instructions :

  1. Save the file registered_only.php to your wp-content/plugins folder
  2. Activate the plugin from the plugin administration page
  3. Relax

Usage Notes:

  1. If you really want your defense against unscrupulous readers to be strong, then disable the “Anyone can register” option in Options->General in your WordPress administration interface.
  2. If you want google and other search engines to be able to index your blog pages, then comment(add two // in the beginning of) the line
    echo '<meta name="robots" content="noindex,follow" />'; . This, however, would mean that the search engines might index your pages and if you want a “private” blog, then this would not be suitable, which is why is it uncommented by default.
  3. If you are getting a “headers already sent” warning, then try adding the following one line to your .htaccess file (create a file called .htaccess if you don’t have one already) :
    PHP_FLAG output_buffering on

This plugin is basically the auth.php file that ships with WordPress 1.2, adapted to fit needs, and is distributed under the GPL license.

This entry was posted in plugin and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>