QuestionsHow do I display database query statistics on wordpress site?
kid
asked 3 years ago
I've noticed that a few WordPress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page. I was wondering how this is accomplished. Is it through the use of a particular WordPress plug-in or perhaps from using some particular PHP function in the page's code?
Pearl Pospiech
replied 1 year ago

link to example would be good, Kid ;-)

1 Answers
tech Staff
answered 3 years ago
Hi,
If you want to show it, you can try adding this to the bottom of the footer in your template:
<?php echo $wpdb->num_queries; ?> <?php _e('queries'); ?>. <?php timer_stop(1); ?> <?php _e('second'); ?>
 

Please login or Register to submit your answer