Skip to content

Instantly share code, notes, and snippets.

@ralphking
Created February 2, 2015 12:37
Show Gist options
  • Save ralphking/82d336cd9a8d32830845 to your computer and use it in GitHub Desktop.
Save ralphking/82d336cd9a8d32830845 to your computer and use it in GitHub Desktop.
// Use wp-config-local.php for local server settings, don't check that file onto the server
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
// Otherwise use the below settings (on live server)
} else {
// Live Server Database Settings
define( 'DB_NAME', 'db_name');
define( 'DB_USER', 'db_username');
define( 'DB_PASSWORD', 'db_password' );
define( 'DB_HOST', 'localhost' );
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
// Turn Debug off on live server
define('WP_DEBUG', false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment