I needed this so bad because having a ton of WP installations for one client was a pain to maintain.  So I developed this hack that simply goes in your wp-config.php file.  It’s simple and works beautifully.  The benefit is that you only need to upload and maintain updates for one set of code for all sites for this client.   The drawback is that you have to install each site and activate and configure each plugin individually.  It is a pain to do and I suggest an assembly line method with each site loaded into it’s own tab and then do the same step across all of them one at a time.  Oh, another drawback is you must upload a unique template for each site since only core files are shared and not the template files.After this pain, life is 10x easier.  Enjoy! :)


//**************************************************
// WordPress Infinite Sites w/ Single-Codebase Hack
//**************************************************
// 1) In webserver config point all domains sharing
// the installation to the same wwwroot
// 2) Install WordPress
// 3) After install creates the wp-congig.php,
// (after the screen that asks the DB info, but
// before you add the site title and email)
// replace line $table_prefix = "wp_"; with this
// code below and edit code for your domains in
// Step 1 in the wp-config.php
// 4) Now visit each domain in a browser to
// complete each install
// NOTE: All sites will share the same plugins so
// install plugins as normal for all sites and
// activate as needed
// NOTE: Like plugins, all sites share templates
// so you will want to upload all templates and
// then select the appropriate template on a
// site by site basis
//**************************************************
// Akarin.com 2010-01-25
//**************************************************

//Configure Domain Array
$allowed_domains = array(‘yourdomain1.com’,
‘yourdomain2.com’,
‘yourdomain3.com’,
‘yourdomain4.com’);

//Grab the Domain
$requested_domain = preg_replace(“/^www\./”, “”, $_SERVER["SERVER_NAME"]);

//Test the Domain
if (in_array($requested_domain, $allowed_domains)) {
if (!$allowed_domains[$requested_domain]) {
$table_prefix = “wp_” . md5($requested_domain);
}
} else {
die(“No domain match in allowed_domains array!”);
}