hatchwebstudio

multisite wordpress. drupal style

9 comments

Last night I spent a few hours hacking together a working multisite Wordpress patch. I modeled the setup after the Drupal multisite setup. It currently only works with the server name, not sub directories. So you can have multiple blogs such as:

  • blog1.example.com
  • blog2.example.com

But not (yet):

  • example.com/blog1
  • example.com/blog2

It looked like a couple other people had done a bit of work on a multisite setup which is where I started. But the first looked like it hadn't been maintained in years, and I was going for a different setup from what the second offered. There's also Wordpress MU, but I wanted multiple blogs, with their own database, which didn't seem to be what Wordpress MU offers.

This setup gives you:

  • Seperate database for each blog
  • A single wordpress codebase serving multiple blogs
  • Plugins and themes available to all blogs
  • Plugins and themes that are site specific

Each site you have will be located in wordpress/wp-sites/example.com.

Okay. So let's get started:

  • Download wordpress-2.1 and uncompress the source
  • Download the patch - wp-multisite-patch.txt
  • Apply the patch (run this command in the parent directory for wordpress):
    • patch -p0 < wp-multisitepatch.txt
  • Create the wp-sites folder: mkdir wordpress/wp-sites/myblog.com
  • Add and configure a wp-config.php file in you my.blog/ directory
  • Start setting up your new site.

I've put more details about this patch on this page.