Check Page Loading Time & Queries in WordPress

Sometimes in WordPress site, we feel our site loading slow and need to wait for few times to complete loading the page. It may occurs for many reasons but one of the major point to make loading time slower is ‘queries’. We may have many installed plugins or lots of custom functions that run huge amount of queries in sites.

So now question may come out how we get to know the page loading time for each page and how many quires run for each pages. Hmm.. WordPress has their own function to view these in your page. Its not a big function or you no need to type lots of things, just copy the below code and place into your footer section before the ‘</body>’ tag:

Total: <?php echo get_num_queries(); ?&gt; queries in &lt;?php timer_stop(1); ?>; seconds.

 

Find the screenshot:
page-loading-time

It will display total number of queries with loading time to execute the page.
display-loading-time

Please remember, the number of queries low meaning your loading time will be faster. So check all your queries to make your loading faster in site. In our next discussion we will explain to reduce loading time and check what are the queries run in your site. So, stay with us and read our post regularly. Thanks.

This post has already been read 5657 times!

Mehedi Hasan

Cool WordPress Developer having much agile experience to develop any kind of WordPress sites & plugins. Also good in troubleshooting, fixing & making any kind of tweaks for WP site.

More Posts

Mehedi Hasan

Cool WordPress Developer having much agile experience to develop any kind of WordPress sites & plugins. Also good in troubleshooting, fixing & making any kind of tweaks for WP site.

One thought on “Check Page Loading Time & Queries in WordPress

  • March 23, 2016 at 5:09 am
    Permalink

    Loved this article when people are busy for the 1st time where someone can convince others to read more or subscribe. As people constantly needed this tricks that IT people mush have added this prior.
    Sounds like this tricks can enhance the WordPress efficiency even this is a tougher task.


    Regards,
    Sourav Basak [Blogger, Entrepreneur, Thinker]
    http://www.namasteui.com

Comments are closed.