Multiply

This plugin is no longer maintained

Multiply is a plugin for WordPress which allows multiple blogs from within the one administration interface. Includes one-click creation of new blogs, with per-blog user permissions, plugins, themes etc. There are good reasons not to use it, and I would urge you to consider them carefully. I recommend WordPress μ.

The plugin is most suitable for a single author with a small number of blogs. Small groups will be fine, but it will not scale well to hundreds of blogs. Do not even think the words "blog farm".

This page describes Multiply for WordPress 2.0; information about Multiply for WordPress 1.5.x (no longer supported) can be found here. For information on upgrading Multiply for WordPress 1.5.x to the latest version, try here.

Now on with our regularly scheduled programming.

Compatability

This version of Multiply works with WordPress 2.0. It has been upgraded to work with WordPress 2.1, but is not well-tested. It has been updated to handle the database schema changes from WordPress 2.3, but hasn't been tested at all for that version. (I have one report that it doesn't work at all.) Use it at your own peril.

Upgrade

Whenever you upgrade WordPress, you need to run the Multiply upgrade script.

Download

If you know what you're getting into, get the code.

Changelog

Caveats

Install

I don't think there'll be any big problems, but you might want to back up your data first.

It should install as soon as the plugin is activated. There are no other files required.

Make

Head over to the "Presses" submenu under "Manage". The blog management page [screenshot] is restricted to administrators. Further, to actually do anything on the page requires the manage_blogs capability, which is granted by default only to user #1. Enter a name in the box, create a new blog. The name you enter will be displayed in the blog selection dropdown menu.

Options

Use the dropdown in the top right-hand corner of the screen [screenshot] to select a press. For each one you create, go through the options menus and set everything to your liking.

The "Blog Address (URI)" should be set differently for each press. If your default press is at http://example.com/me/, try http://example.com/i-love-my-cat/ or http://example.com/me/loves-cats/.

You can use different themes and plugins with each press.

Files and folders

You'll need a new index.php at each selected Blog Address (URI). Information you'll need to know:

The file should contain something like this:

<?php 
$mb_press_id = 1;
define('WP_USE_THEMES', true);
require('../wp-blog-header.php');
?>

... where $mb_press_id is whatever the press ID is, and you're requiring the relative path to wp-blog-header.php.

For example, if WordPress is installed at http://example.com/wp/ and you want a new press (ID, say, #4) at http://example.com/cats-are-super/, your http://example.com/cats-are-super/index.php file should contain this:

<?php 
$mb_press_id = 4;
define('WP_USE_THEMES', true);
require('../wp/wp-blog-header.php');
?>

If you're using .htaccess/mod_rewrite, you should generate a set of rules for each press, and (if the file isn't saved automatically) it should go in the same directory as the index.php you just made.

Users

Just switch between blogs and use the Users->Authors & Users menu to grant per-blog privileges as desired. User #1 is an administrator by default on every blog.

Pingbacks

Getting pingbacks to work is a pain.

In wp-includes/template-functions-general.php there is a function called get_bloginfo() starting at around line 75.

You need to change this:

case 'pingback_url':
    $output = get_settings('siteurl') .'/xmlrpc.php';
    break;

To this:

case 'pingback_url':
    if (is_callable( array('Multiply', 'xmlrpc_url') ))
        $output = Multiply::xmlrpc_url();
    else
        $output = get_settings('siteurl') .'/xmlrpc.php';
    break;

It'll happily go back to the old behaviour if you should ever uninstall Multiply.

If you're using .htaccess/mod_rewrite, you're done. If you're not, or you're not sure, there's one more step.

For each press you add, you need to add a file called xmlrpc-{$press_id}.php to the WordPress install directory, where "{$press_id}" is the ID of the press. Multiply will try and create this file automatically, but on many hosts you will need to do it yourself. The contents are similar to those of the index.php you already made. For example, xmlrpc-3.php would contain this:

<?php 
$mb_press_id = 3;
require('./xmlrpc.php');
?>

This should be placed in the WordPress install directory -- the one containing wp-blog-header.php, wp-login.php and the rest.

Plugins

Out-of-the-box, you can have plugins on the alternate presses that aren't on the main one, but not the other way around. If you have plugins active on the main site that you don't want on other blogs, you need to make a very small change to wp-settings.php.

Search for the line that says:

if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))

and change it to this:

if (!isset($multiply_real_prefix) && '' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))

That's it.

XML-RPC posting

If you've used the pingback fix above, you can post to your blog using a rich client like W.Bloggar or Ecto by pointing it at (e.g.) xmlrpc-3.php.