Makes WordPress Faster
Introduction
WP Super Cache is a static caching plugin for WordPress. It generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. By using this plugin you will speed up your WordPress blog significantly.
This plugin is a fork of the excellent WP-Cache 2 by Ricardo Galli Granada. WP-Cache 2 caches the pages of your WordPress blog and delivers them without accessing the database. Unfortunately it still means loading the PHP engine to serve the cached files.
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) as 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.
Pay what you want!
WP Super Cache is a free plugin but donations are gladly accepted. Go on, drop a Dollar in my PayPal donation box! I also have an Amazon Wishlist too if you’re feeling particularly generous.
Download and Install
How it works
A classic method of preparing an under powered site for a Digg front page 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 cached, view the source and the last lines on the page should read something like
<!-- Dynamic Page Served (once) in 0.829 seconds -->
<!-- Cached page generated by WP-Super-Cache on 2009-01-12 16:11:54 -->
<!-- Compression = gzip -->You’ll only see the last line if compression is enabled.
If you have compression enabled it is no longer possible to determine which cache the page was served from without looking at the page headers. Pages served from the WP-Cache “half on” cache will have an extra header.
There are many ways of viewing the headers.
With compression disabled, the text <!-- super cache --> will be displayed at the end of the page if the page is served from the static Supercache.
Use ismyblogworking.com to check if compression is working properly. It will also show just how fast your blog is now.
Features
do_cacheaction() and add_cacheaction() like you would with WordPress hooks. Plugins can add their own options to the admin page too. Works well with WordPress MU in VHOST or non-VHOST configuration. Each blog’s cache files are identified to improve performance. Normal WP-Cache files are now split in two. Meta files go in their own directory making it much faster to scan and update the cache. Includes this WP-Cache and protected posts fix. Automatically disable gzip compression in WordPress instead of dying. As Akismet and other spam fighting tools have improved, the cache will only be invalidated if a comment is definitely not spam. A “lock down†button. I like to think of this as my “Digg Proof†button. This basically prepares your site for a heavy digging or slashdotting. It locks down the static cache files and doesn’t delete them when a new comment is made. Supercache static files can be regenerated while serving a slightly out of date file. This will significantly lower the load on a busy server with lots of traffic and comments. Think of it as an automatic “lock down mode” for every page on your site. Automatic updating of your .htaccess file. (Backup your .htaccess before installing the plugin!) Don’t super cache any request with GET parameters. Better version checking of wp-cache-config.php and advanced-cache.php in case you’re using an old one. Better support for Microsoft Windows. Properly serve cached static files on Red Hat/Cent OS systems or others that have an entry for gzip in /etc/mime.types. The Reject URI function now uses regular expressions. Supports the Bad Behaviour plugin if installed (Half on mode only). Supports plugins that show a different theme to mobile devices.Caveats
Performance Benchmarks
Benchmarks coming soon, but under high load, serving static html files will always trump dynamic PHP requests.
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:

Sites using the Super Cache
Here are a few of the sites that used and helped me build and debug WP Super Cache:
All my sites are hosted on Linode and I can’t complain about them. They’re great.
Support queries and requests should be made through the Super Cache forum.
