This patch does 4 primary things:

1. This patch creates a wp-config.php script that looks like this:


require_once("wp-sites/" . WPSITE . "/wp-config.php");



This file loads the settings from the target site and sets up the WPSITE variable. In the case of this site, WPSITE = scotthadfield.ca.

2. Enables wp-includes/themes.php to search the site specific themes3. Enables wp-admin/admin-functions.php to search the site specific plugins.

4. It also adds a new function to admin-functions.php: get_plugin_path(). which returns the path of the requested plugin. This is used to remove the semi-hardcoded calls to the plugin path (i.e. anywhere that used code similar to ABSPATH . PLUGINDIR . '/' . $plugin is now get_plugin_path($plugin). The following patch has only been tested against Wordpress 2.1.

In addition to the patch we also need site specific folders that will contain the configuration for each of our blogs:

mkdir -p wordpress/wp-sites/example.com
cp wordpress/wp-config-sample.php wordpress/wp-sites/example.com/wp-config.php
cd wordpress/wp-sites/example.com
mkdir themes plugins

The themes and plugins folders in your example.com blog directory will allow you to have plugins and themes that are only available to that specific blog. If you want the themes and plugins available for all of your blogs install them in the regular wordpress location (i.e. wp-content). You can also create a uploads folder and set wordpress to use that folder for all uploads.