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(); ?> queries in <?php timer_stop(1); ?>; seconds.
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 2553 times!