Skip to content

Instantly share code, notes, and snippets.

@atsea
Last active October 24, 2017 14:41
Show Gist options
  • Save atsea/f14478bd6bf8bf6c83f32a03986f4e7f to your computer and use it in GitHub Desktop.
Save atsea/f14478bd6bf8bf6c83f32a03986f4e7f to your computer and use it in GitHub Desktop.
Pantheon wp_debug inside wp_config
<?php
// Original located at https://github.com/pantheon-systems/pantheon-settings-examples/blob/master/wordpress/wp-debug-expanded.wp-config.php
// ASD gist https://gist.github.com/atsea/f14478bd6bf8bf6c83f32a03986f4e7f
// All Pantheon Environments.
if (defined('PANTHEON_ENVIRONMENT')) {
//Wordpress debug settings in development environments.
if (!in_array(PANTHEON_ENVIRONMENT, array('test', 'live'))) {
// Debugging enabled.
if (!defined( 'WP_DEBUG' )) {
define( 'WP_DEBUG', true );
}
define( 'WP_DEBUG_LOG', true ); // Stored in wp-content/debug.log
define( 'WP_DEBUG_DISPLAY', true );
}
// Wordpress debug settings in test and live environments.
else {
// Debugging disabled.
ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment