Created
July 3, 2013 18:57
-
-
Save burbridgeconsulting/5921684 to your computer and use it in GitHub Desktop.
WP Debug Setup for wp-config.php, with notes for useful plugins. Several settings derived from: http://wp.smashingmagazine.com/2013/05/29/tips-tricks-testing-wordpress-themes/
My own server conditional switching, derived from a previous client. Allows you to include wp-config.php in repo, if you like. Also adds recommended plugins.
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
// ** Recommended plugins: Debug Bar, and related plugins (do search on "debug bar") | |
// ** Define environments for different machines. | |
$user = $_ENV['LOGNAME']; | |
$host = $_SERVER['HTTP_HOST']; | |
$environment = $user . ' / ' . $host; | |
// echo "\$environment='{$environment}'"; | |
switch ($environment) { | |
case 'chrisburbridge / mysite.dev': | |
define('DB_NAME', 'mysite'); | |
define('DB_USER', 'root'); | |
define('DB_PASSWORD', 'xFSY0fZ2AGjtc'); | |
define('DB_HOST', 'localhost'); | |
define('SITE_DEV', 'true'); | |
require_once('/func/dump.php'); | |
// Inspired by: http://wp.smashingmagazine.com/2013/05/29/tips-tricks-testing-wordpress-themes/ | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_LOG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors', 0); | |
define('CONCATENATE_SCRIPTS', false); | |
define('EMPTY_TRASH_DAYS', 0 ); | |
break; | |
default: | |
define('DB_NAME', 'mysite'); | |
define('DB_USER', 'mysite'); | |
define('DB_PASSWORD', 'mysite'); | |
define('DB_HOST', 'localhost'); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment