Last active
June 30, 2021 23:05
-
-
Save aaronsummers/8dc3d9a5e2b95be6a44921e68f5a717d to your computer and use it in GitHub Desktop.
WP-Config constants
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 | |
/* | |
* limit post revisions to 3 | |
*/ | |
define( 'WP_POST_REVISIONS', 3 ); | |
/* | |
* Debugging | |
*/ | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
@ini_set( 'display_errors', 0 ); | |
/* | |
* Force allow plugin install and updates from dashboard | |
*/ | |
define('FS_METHOD', 'direct'); | |
/* | |
* Disable WP default cache | |
*/ | |
define('WP_CACHE', false); | |
/* | |
* Analyze the queries WordPress does during the display of a page | |
*/ | |
define('SAVEQUERIES', true); | |
/* | |
* Then add this to the theme footer.php | |
*/ | |
if (current_user_can('administrator')) : | |
global $wpdb; | |
echo '<pre>' . print_r($wpdb->queries, true) . '</pre>'; | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment