QuestionsCategory: Technical QuestionHow do I display database query statistics on wordpress site?
asked 2 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 6 months ago

link to example would be good, Kid ;-)

1 Answers
tech Staff
answered 2 years ago
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'); ?>


Your Answer