WordpressMu: Don’t allow new blogs
31 Oct, 2006
1 minute read

If you’re using WordpressMu, the blog hosting tool used on Wordpress.com, you may want to disable the creation of blogs by your visitors.

Whatever your reasons for this are, I wanted to prevent this, because I (and my team of editors) want to maintain several blogs on different topics. Users are free to register and post comments, but creating new blogs is reserved for the administrator.

So, how do you implement this in WordpressMu? There is no checkbox (yet) that disables this feature. So, I had to hack the WordpressMu code a bit.

First, open up wp-signup.php. If you access a blog that does not exist, you’ll be redirected to the signup page and be presented a signup form for that particular blog.

Open up wp-singup.php en just above the get_header(); call, place the following code:

if (!is_user_logged_in() || $user_identity != 'admin') {
    header("Location: http://example.com/gofishatthispage/");
    exit();
}

What this does is make sure that only a logged in user named ‘admin’ is allowed to proceed to the blog creation form. Others will be redirected to a location of your choice. A good idea is to send people to a page that explains why they can’t’ create a blog or what they have to do to get an administrator to create one for them.

If you're seeing this message you've probably enabled some form of adblocker. I respect that.

I use this space to show recommended books on Amazon.com in relation to the post you just read. This generates a small income that allows me to buy a book every now and then.