Last active
December 29, 2015 15:39
-
-
Save iloveitaly/7692527 to your computer and use it in GitHub Desktop.
Custom config block I use for WordPress development with DreamHost
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 | |
/* Config Custom | |
*******************************/ | |
define('IS_LOCAL', isset($_SERVER['IS_PRODUCTION']) || strpos($_SERVER['DOCUMENT_ROOT'], '/Users/Mike') === 0); | |
if(IS_LOCAL) { | |
define('WP_DEBUG_LOG', true); | |
define('WP_DEBUG_DISPLAY', true); | |
@ini_set('display_errors', 1); | |
} else { | |
@ini_set('log_errors','On'); | |
@ini_set('display_errors','Off'); | |
@ini_set('error_log', "/home/{$_SERVER['DH_USER']}/php.log"); | |
} | |
// https://gist.github.com/hereswhatidid/5447386 | |
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', true); | |
define('DISALLOW_FILE_EDIT', true); | |
if(IS_LOCAL) { | |
define('DB_NAME', 'thedb'); | |
define('DB_USER', 'root'); | |
define('DB_PASSWORD', 'root'); | |
define('DB_HOST', 'localhost'); | |
} else { | |
define('DB_NAME', 'server_name'); | |
define('DB_USER', 'server_user'); | |
define('DB_PASSWORD', 'server_pass'); | |
define('DB_HOST', 'server.com'); | |
} | |
/* End Config Custom | |
*******************************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment