Skip to content

Instantly share code, notes, and snippets.

@aaronsummers
Last active June 30, 2021 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronsummers/8dc3d9a5e2b95be6a44921e68f5a717d to your computer and use it in GitHub Desktop.
Save aaronsummers/8dc3d9a5e2b95be6a44921e68f5a717d to your computer and use it in GitHub Desktop.
WP-Config constants
<?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