groups

name language licence
SHOW DIFFERENT AMOUNT OF POSTS ON WORDPRESS HOME PAGE THAN OTHER PAGES PHP BSD
ANAGE MULTIPLE WORDPRESS SITES WITH ONE DATABASE AND ONE CODE BASE PHP BSD
WORDPRESS QUERY POSTS OF CERTAIN CUSTOM FIELD VALUES PHP BSD
WORDPRESS LOAD JQUERY PHP BSD
WORDPRESS GET CONTENT PHP BSD
WORDPRESS: LATEST POSTS FROM CATEGORY PHP BSD
WORDPRESS QUERY POST FOR A SPECIFIC PAGE PHP BSD
Social bookmarking of posts PHP BSD

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >



language: PHP
licence: BSD

ANAGE MULTIPLE WORDPRESS SITES WITH ONE DATABASE AND ONE CODE BASE

options: view full snippetsend to code collector
//URL: http://sitening.com/blog/how-to-easily-manage-multiple-wordpress-sites-with-one-database-and-one-code-base/

//This is a simple but powerful tweak to the wp-config.php file that will make it easy to run multiple websites using one database and codebase. Simply change "yourdomain.com" with your domain and that's it. Repeat that line for new domains.

// You can have multiple installations in one database if you give each a unique prefix
 
$domain_list = array();
 
// auto database name
$domain_list["yourdomain.com"] = "";\
 
$domain_name = preg_replace("/^www\./", "", $_SERVER["SERVER_NAME"]);
 
if (array_key_exists($domain_name, $domain_list))
{
	
(Continues...)