Created
November 23, 2012 13:09
-
-
Save de-raaf-media/4135547 to your computer and use it in GitHub Desktop.
Show all wordpress queries used
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
// Add this to your wp-config file: | |
// Do not leave this enabled on a production environment | |
define('SAVEQUERIES', true); | |
//Then, somewhere in your template (probably at the end of the footer.php, add this code: | |
if (SAVEQUERIES) { | |
echo "<pre>"; | |
print_r($wpdb->queries); | |
echo "</pre>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment