Display wordpress page loading time and number of queries

November 16, 2008 · Print This Article

Do you ever asked yourself how long it took for your page to load, or how many sql queries were executed?

If yes, here is a simple code to insert on your template.

Nothing hard here.

Simply paste the following code on your footer.php file:

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

The get_num_queries() function returns the number of executed query during your page loading.


Related articles:

Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.