Ever wondered if you needed a caching plugin for your WordPress blog? You have the impression your blog’s homepage takes forever to load? You hate it when your friends call your blog ‘interesting, but so slow’?

Well, I did, so I wanted to find out just how slow it was. I set up an MRTG monitoring system on my Dreamhost account. First thing I did was to add 2 tests:

  • the download time of my blog’s home page (which involves quite some PHP/MySQL)
  • the download time of a small CSS file on the same site, which involves no PHP

Let’s take a look at the CSS file first:
Getting a CSS file from my site: always fast
The green line is my 500ms treshold: everything above it is too slow.You see that most of the time my CSS file can be downloaded faster than that (actually the average is around 250ms). There is the occasional peak, which might be caused by temporary network congestion or a server busy doing other stuff – it IS a shared hosting after all.

Now compare this to the time it takes to get my homepage:
The effect of WP-Cache on WordPress speed
The average was more around 1,5 seconds, that is, until last Monday. On Monday I installed WP-Cache 2.0, a WordPress (2.0) plugin that saves each delivered page on disk for an hour. So the PHP overhead (including SQL statements to get posts, related posts, comments, blogroll, …) is no longer executed for each and every page request. If that page was requested less than an hour ago, there is a saved copy on disk that is returned immediately instead of re-rendering it. The effect: my average access time has dropped to 302ms.

Let’s show you the immediate effect on a second blog I manage:
Immediate effect of WP-cache
This is a ‘DAY’ chart instead of a ‘WEEK’ chart, so you can see the individual samples (every five minutes). How hard is it to guess where WP-Cache kicked in?

Any WordPress installation, but certainly those with plugins like the Ultimate Tag Warrior (those ‘related posts’ are super, but slow) or Brian’s Latest Comments, could profit from this caching tool. Depending on the traffic, that is: you need at least something like 48 visits/day to see an improvement, if you keep the default expiration of 3600 seconds.

Ricardo Galli has developed a top-notch plugin, that works out-of-the-box with minimal configuration necessary. Make your WordPress fly, get WP-Cache!

(hat-tip to theblogjoint.com for reminding me I should try it)