Last active
August 29, 2015 14:01
-
-
Save jester1979/7f304de2b96e7e11d187 to your computer and use it in GitHub Desktop.
Use a custom-config.php which can be excluded from Git
This file contains hidden or 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 ( file_exists( dirname( __FILE__ ) . '/custom-config.php' ) ) { | |
//this handy dandy file can be excluded from your Git or SVN repo! | |
//so each developer can use his/her own config :-) | |
include( dirname( __FILE__ ) . '/custom-config.php' ); | |
} else { | |
//production config goes here, example: | |
define( 'DB_NAME', 'projectname_prod' ); | |
define( 'DB_USER', 'projectname_prod_user' ); | |
define( 'DB_PASSWORD', '12345' ); | |
define( 'DB_HOST', 'localhost' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment