Donncha 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:
- 25 Photographs Taken at the Exact Right Time – 6,000+ Diggs
- 13 Amazing Cirque du Soleil Performances – 624+ Diggs
- The 10 Craziest Competitive Sports (You Never Heard Of) – 520+ Diggs
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.
This is really interesting. This is one of the reasons that I love surfing. You’ll never know what you’ll find.
telefoane gsm, iPhone, pda, htc, notebook, laptop, magazin online, telefoane mobile gsm
Personally I use W3 Total Cache. I’m also curious what you think about this plugin.
I just seen an update for super cache, did anyone else upgrade?
now this update could of been out for a while, but I just got mine updated last week
Hi John
thank you so much for your help.
It always makes me feel wonderful about the human race when someone I just came across online helps me and others like this even going the extra mile to take a look at my site.
With all the hassle I have had today with my site going belly up – you have made me smile again
Thanks
Janice
Janice,
Although the documentation may say that the .htaccess file will be a the root, I think it is really referring to the Blog root, so you should be fine.
In order to check and see if it’s working you need to do the following:
Also, I checked your site and it is indeed working!
Take care,
John P.
I just added supercache to my site after getting well and truly dugg.
Just a couple of questions, supercache wrote it’s rewrite commands to the .htaccess file at /blog level rather than the site root. Is that Ok? The instructions just say “Look in your web root directory for this file”
Also, how can I tell if pages are being cached or not? I’m not sure how to tell if this is working.
Thanks
Janice
I just added this to http://www.vbulletinsetup.com and it’s running like a champ :)
I’m going to add it to one other blog, thanks for the tips.
Derek,
The cache is being dynamically generated along with page requests. So, what happens is, when a visitor comes to a page the system dynamically generates it, then saves a version to the SuperCache. The next (and subsequent) person that comes gets the SuperCache version delivered to them.
The cache is refreshed according to the schedule that you determine in the settings for the plugin. Hope that clarifies things a bit!
John
Oh I had to catch up on my feeds. I had left a comment on your plugin list about trying this out. It sounds like an interesting plugin, but I’m still not quite sure that I understand how the static html is being generated. Is it happening on the posting? In any case, I can always just try it out and look through the code if I really care to know. Thanks for the info in any case.
Sent*
btw, the new v.3.1 still doesn’t work in my configuration, :(
Grrr! It looks like I had developed an RSS feed problem, so thanks for letting me know about the e-mails not going out because I’ve been too busy to notice! But you were right, any time you don’t get a daily update – especially for 2-3 days – you know there is a problem! :-) Should be fixed now, so tomorrow you’ll probably get like 5 posts in one day…
Take care,
John
Wow! In!
WP-Cache is a must after your first major digg, reddit, fark, etc. attack. My server still struggled to keep up though during those times – dugg and checked out. Thanks John!
Oh and is your email feed working? I hadn’t gotten any “new article” emails the past day or two and just checked to find several new articles?
Takashi – can you email me at “donncha at ocaoimh.ie” please? As you’re using a Windows box maybe you could do some beta testing for me :)
WP Super Cache options page is still blank, even after following all of the instructions,
including what is in the faq.
Apache 2.2 win32 on w2k3.
Wordpress 2.4-bleeding
also v2.31
Oh, and the plugin is still listed as v.1 once installed, not v.2.
The wordpress plugin db page lists v.1 also, even though it gives you v.2