WP-Cache speeds up your WordPress!20 Sep 2006
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’?
- 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:
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 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:
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.
(hat-tip to theblogjoint.com for reminding me I should try it)