WordPress: How To Show Number of Queries and Page Load Time

These days speed is everything, and with the vast amount of WordPress plugins and widgets available, your site can easily get bogged down. If you are looking to speed and tidy your WordPress site up it is more than likely that you are going to want to know how long a page takes to load and how many MySQL queries the page is running.

All you need to do is copy and paste the below code into one of your theme files (e.g. footer.php):

<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.

Or if you don’t want this to actually display on the page, you can put it in HTML comments like this:

<!--<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.-->
Free Graphics, Icons, Tutorials
Free Graphics Free Christmas Vector Icon Graphics Pack 2017Free Fitness Vector Icons Graphics PackFree Camping Vector Graphics PackFree Summer Graphics PackFree File Icon PackFree Fast Food Vector Graphics
Sharing is caring...
Like & Follow
Share the love, share this page! Facebook Twitter Digg Reddit LinkedIn Pinterest Email
Close [X]
The Web Taylor
1000 Lakeside North Harbour Portsmouth, Hampshire PO6 3EN
02392 123358