Last active
October 11, 2015 09:47
-
-
Save jester1979/3839827 to your computer and use it in GitHub Desktop.
DTAP in wp-config.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( stristr( $_SERVER['SERVER_NAME'], 'development' ) ) { | |
// ** MySQL settings DEVELOPMENT ** // | |
define( 'DB_NAME', 'projectname_dev' ); | |
define( 'DB_USER', 'projectname_dev_user' ); | |
define( 'DB_PASSWORD', '*****' ); | |
define( 'DB_HOST', 'localhost' ); | |
// ** WP_DEBUG setting DEVELOPMENT ** // | |
define( 'WP_DEBUG', true ); //on development WP_DEBUG is always on!!! | |
} elseif ( stristr( $_SERVER['SERVER_NAME'], 'testing' ) ) { | |
// ** MySQL settings TESTING ** // | |
define( 'DB_NAME', 'projectname_test' ); | |
define( 'DB_USER', 'projectname_test_user' ); | |
define( 'DB_PASSWORD', '*****' ); | |
define( 'DB_HOST', 'localhost' ); | |
// ** WP_DEBUG setting TESTING ** // | |
define( 'WP_DEBUG', true ); //you can decide what is best for you, but I believe | |
} elseif ( stristr( $_SERVER['SERVER_NAME'], 'acceptance' ) ) { | |
// ** MySQL settings ACCEPTANCE ** // | |
define( 'DB_NAME', 'projectname_acc' ); | |
define( 'DB_USER', 'projectname_acc_user' ); | |
define( 'DB_PASSWORD', '*****' ); | |
define( 'DB_HOST', 'localhost' ); | |
// ** WP_DEBUG setting ACCEPTANCE ** // | |
define( 'WP_DEBUG', false ); | |
} else { | |
// ** MySQL settings PRODUCTION ** // | |
define( 'DB_NAME', 'projectname_prod' ); | |
define( 'DB_USER', 'projectname_prod_user' ); | |
define( 'DB_PASSWORD', '*****' ); | |
define( 'DB_HOST', 'localhost' ); | |
// ** WP_DEBUG setting PRODUCTION ** // | |
define( 'WP_DEBUG', false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment