Donncha O’CaoimhDonncha O’Caoimh, one of WordPress’ lead developers spent the last few weeks working on a brand new plugin called WP Super Cache which is, without a doubt, the biggest advance in WordPress performance in years. (Please Digg it fast!)

Donncha has not only improved the existing ubiquitous WP-Cache system for users that are logged in (bug fixes, added plugin capabilities, etc), he’s literally invented a new methodology for static caching of documents for visitors which renders at least a 2-3X performance improvement over WP-Cache.

Some of you have noticed that I had a couple of service disruptions in the last few weeks, and this is because OMB was playing guinea pig to this new plugin during the development phase. Although the plugin has worked flawlessly, I had a couple of server configuration issues that have been challenging.

All of those issues have been worked through now, and I’m telling you, every WordPress blogger on the planet WILL BE using this plugin for a long time to come. It is truly revolutionary, so if you run a blog I strongly encourage you to install it.

Overview

Most WordPress users are familiar with the excellent WP-Cache 2 by Ricardo Galli Granada. It caches the pages of your WordPress blog and delivers them without accessing the database. Unfortunately it still means loading PHP to serve the cached files despite what the wordpress.org wp-cache page says.

WP Super Cache gets around that. When it is installed, html files are generated and they are served without ever invoking a single line of PHP. How fast can your site serve graphic files? That’s (almost) how fast it will be able to serve these cached files. If your site is struggling to cope with the daily number of visitors, or if your site appears on Digg.com, Slashdot or any other popular site then this plugin is for you. There are a few caveats however:

  • If you’re logged in or have left a comment you’ll never see a super-cached page. You’ll see plain old regular WP-Cached pages instead. That’s not so bad since a huge majority of your visitors will never leave a comment.
  • Mod Rewrite is used to serve the static HTML pages. As fancy permalinks is also a requirement it should already be installed.
  • Some of the more dynamic aspects of your site’s template won’t refresh quite as quickly. For example, recent comment sidebar plugins.
  • Some sites have problems serving compressed html files and need extra configuration.

How it works

A classic method of preparing an underpowered site for a Digg frontpage appearance or a Slashdotting has been to manually save copies of dynamically generated pages, and place them in directories that match the permalinks structure. This method of performance enhancement does help servers handle a higher load without crashing, but is only effective when an oncoming rush of traffic can be anticipated. WP-Cache alone, while helpful, is not adequate in many cases, so WP Super Cache was created to effectively mimic the manual page caching method, but to handle it in an automated fashion.

When a visitor who is not logged in, or who has not left a comment, visits they will be served a static HTML page out of the SuperCache subdirectory within the WordPress cache directory. If you navigate to that directory you can view an exact replica of your permalink structure as well as the HTML files within the directories. To determine if a page has been served out of the Super Cache, view the source and the last line on the page should read <!-- super cache -->.

If a visitor who is logged in or who has left a comment views a cached page, it will be served from the standard WP Cache function and the last line in the source code will read <!-- Cached page served by WP-Cache -->

WP Super Cache has also been tested under real world load conditions. The following articles appeared on the Digg front page without issue while running WP Super Cache:

So again, this plugin is not even optional! There is simply no reason NOT to run it, so go get it and follow the instructions in the Readme.txt file to install it. If you have questions, you can either ask them here, or over on Donncha’s blog and we’ll get you assistance in making sure it’s running right.

Tags: , , , , ,

Related Articles