Skip to content

Instantly share code, notes, and snippets.

@jimi008
Created September 20, 2016 15:27
Show Gist options
  • Save jimi008/f232fd7cfe11fef59f56eef58d3c9bed to your computer and use it in GitHub Desktop.
Save jimi008/f232fd7cfe11fef59f56eef58d3c9bed to your computer and use it in GitHub Desktop.
WordPress local dev tips: DB & plugins by Mark https://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/
/dir-that-contains-wp-config/local-config.php
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) {
include( dirname( __FILE__ ) . '/local-config.php' );
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later
} else {
define( 'DB_NAME', 'production_db' );
define( 'DB_USER', 'production_user' );
define( 'DB_PASSWORD', 'production_password' );
define( 'DB_HOST', 'production_db_host' );
}
if ( !defined( 'SCRIPT_DEBUG' ) )
define( 'SCRIPT_DEBUG', false );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment