Last active
December 23, 2015 09:39
-
-
Save michaeldozark/6616352 to your computer and use it in GitHub Desktop.
Better WordPress Debugging: Use WP_DEBUG flag, but only output errors to error log. Goes in wp-config.php. Thanks to ZippyKid for the idea.
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
define('WP_DEBUG', true); // false | |
if (WP_DEBUG) { | |
define('WP_DEBUG_LOG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors',0); | |
} |
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
/** | |
* dynamic site and home urls | |
*/ | |
define('WP_HOME','http://'. $_SERVER['SERVER_NAME']); | |
define('WP_SITEURL','http://'. $_SERVER['SERVER_NAME']); | |
/** | |
* reduce auto-saves and days in trash to reduce database growth | |
*/ | |
define( 'AUTOSAVE_INTERVAL', 300 ); // 5 minutes | |
define( 'EMPTY_TRASH_DAYS', 5 ); // 5 days | |
define( 'WP_POST_REVISIONS', 3 ); // Last 3 revisions kept | |
/** | |
* restrict file editing and updates to prevent errors | |
*/ | |
define( 'DISALLOW_FILE_EDIT', true ); // do not allow file editing from dashboard | |
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); // make sure WordPress automatically applies minor updates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added extra definitions for governing trash, revisions and dashboard file editing.