Return to Snippet

Revision: 27142
at May 25, 2010 00:58 by chrisjlee


Initial Code
if($_SERVER['HTTP_HOST']==’livedomain.com’ || $_SERVER['HTTP_HOST']==’www.livedomain.com’){
define(‘DB_NAME’, ‘db_name_live’); // The name of the database
define(‘DB_USER’, ‘mysql_username_live’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_live’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, true);
}else{
define(‘DB_NAME’, ‘name_of_db_local’); // The name of the database
define(‘DB_USER’, ‘mysql_username_local’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_local’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, false);
}

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);
/* That’s all, stop editing! Happy blogging. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
require_once(ABSPATH . ‘wp-settings.php’);

Initial URL
http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/

Initial Description
Source: http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/

Initial Title
WP-config.php : localhost and development and live site on in one file.

Initial Tags
php, wordpress

Initial Language
PHP