WP-Cache speeds up your WordPress!

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)

8 thoughts on “WP-Cache speeds up your WordPress!”

  1. Peter, did you something special? I was testing it on Druivensuiker, but I can’t make it work. Everything is enabled, wp-content and cache are writeable, … but I don’t get the comment at the end of the page and nothing is cached at all.

  2. The installation was very simple every time I did it:
    – upload plugin folder
    – enable wp-cache plugin
    – disable gzip (if necessary)
    – set wp-cache options

  3. Hello Peter,
    I would really appreciate your comments , or even better a comperative speed test , of an alternative way of adding gzip support to wp-cache, caching gzip output the first time it is requested and avoiding to compress it again every time it gets downloaded.
    You can find it
    here

    If I understood it correctly , in order to do a similar test ,I must have a dedicated server?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.