One WordPress installation, multiple blogs 1
09.19.2008 by Denis - 0 CommentPosted in WordPress
For different database:
1. Point all domains to the same WordPress root directory.
2. Add the following code at beginning of wp-config.php:
$hostname = $_SERVER['HTTP_HOST']; switch ($hostname) { case "fairyfish.com": $db = "db1"; break; case "denis.fairyfish.com": $db = "db2"; break; } // ** MySQL settings ** // define('DB_NAME', $db); // The name of the database