WordpressMu: Don’t allow new blogs

| Posted: - Last updated:
| Tagged general everything features wordpressmu
| ~300wrds (~1min)

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/");

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.

My site is free of ads and trackers. I record privacy-respecting usage statistics with Fathom.

Was this post helpful to you? Why not ☕ Buy me a coffee or use Brave Browser to send a tip.