Properly display page loading times in WordPress

While preparing to launch this blog, I noticed a number of other sites that displayed how long the page took to create. Many of the solutions I found to add this functionality did not yield the proper result, so after much tinkering and looking for solutions on the interweb, I will share the product.

Access your WordPress installation by using FTP and find the folder for the template, which is located in /wp-content/themes/name of your theme. In this folder are a number of files, including header.php and footer.php. Open these two files in a text editor and add the following lines:

To the header.php file:

Add this at the very top of the file, on the second line.

To the footer.php file:

Add this next to “Powered by WordPress” and you should see the time on each page of your site.
[tags]Wordpress, timer, Akismet, PHP, blog, technology[/tags]

One comment on “Properly display page loading times in WordPress
  1. Just looking at your page on my brand new Garmin Phone , and I wanted to check if it would let me reply or if it was going to me go to a desktop to do that. Ill check back later to see if it worked.