Created
March 30, 2010 12:39
-
-
Save nb/349063 to your computer and use it in GitHub Desktop.
Using more than one WordPress codebase for multiple installs without symlinks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase /baba/ | |
RewriteRule ^$ ../trunk/$1?_config=baba [L,QSA] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ ../trunk/$1?_config=baba [L,QSA] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DB_NAME', 'baba'); | |
define('DB_USER', 'root'); | |
define('DB_PASSWORD', 'root'); | |
define('DB_HOST', 'localhost'); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
define( 'ABSPATH', '/www/trunk/'); | |
define( 'WP_SITEURL', 'http://x/baba'); | |
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/content'); | |
define( 'WP_CONTENT_URL', WP_SITEURL . '/content'); | |
require_once( ABSPATH . 'wp-settings.php' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_configs = array( | |
'baba' => '/www/baba/baba-wp-config.php', | |
'dyado' => '/www/dyado/dyado-wp-config.php', | |
); | |
if ( isset( $_GET['_config'] ) && isset( $_configs[$_GET['_config']] ) ) { | |
require_once $_configs[$_GET['_config']]; | |
} else { | |
die( 'Nothing to see here, move along, move along.' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment