Skip to content

Instantly share code, notes, and snippets.

@salcode
Created February 25, 2014 11:21
Show Gist options
  • Select an option

  • Save salcode/9207142 to your computer and use it in GitHub Desktop.

Select an option

Save salcode/9207142 to your computer and use it in GitHub Desktop.
wp-config.php modifications for a WordPress project managed with Siteground git deployment
// REPLACE EXISTING DB define lines with this code
// Technique taken from
// http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later
} else {
define('DB_NAME', 'production_db_name');
define('DB_USER', 'production_db_user');
define('DB_PASSWORD', 'production_db_pwd');
define('DB_HOST', 'localhost');
}
// ...
// REPLACE EXISTING WP_DEBUG define line with this code
if ( !defined( 'WP_DEBUG' ) ) {
define('WP_DEBUG', false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment