groups

name language licence
truncate a wordpress post - PHP - Snipplr PHP BSD
CUSTOM TEMPLATES FOR POSTS IN WORDPRESS PHP BSD
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

< 1 2 3 4 5 6 7 8 9 >



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...)