WP Super Cache with Object Cache support

Here’s a quick post to encourage brave testers. I’m adding object cache support to WP Super Cache so you’ll be able to store your cached files in a memcached backend instead of disk.

It’s not complete but it’s running on this blog and well, you’re reading this which means it’s doing something and not breaking! If you want to give it a go grab the development version from the download page.

There are few caveats, but three spring to mind:

  • It won’t cache anything for “known” users. That is users who are logged in or leave comments. Usually a tiny minority of the visitors to any site.
  • Refreshing of the cache is very incomplete. If you leave a comment, the cache for that page may not update immediately. The cache lifetime is set to 30 seconds, and after you leave a comment you become a “known user” and see the uncached version of the page anyway.
  • When posts are updated the whole cache is invalidated.

If you don’t know what memcached is, or how to set it up then you probably don’t want to test this. If you do, use Google and find out about them. Unfortunately I don’t have time to explain how to install it.

Inspiration and some code taken from batcache, the excellent caching plugin we use on WordPress.com.

Update! I updated the Changelog in the readme.txt and I’m looking for testers. Here’s what’s new in the development version:

* Added experimental object cache support.
* Added Chinese(Traditional) translation by Pseric.
* Added FAQ on WP-Cache vs Supercache files.
* Use Supercache file if WP-Cache file not found. Useful if mod_rewrite rules are broken or not working.
* Get mobile browser list from WP Mobile Edition if found. Warn user if .htaccess out of date.
* Make sure writer lock is unlocked after writing cache files.
* Added link to developer docs in readme.
* Added Ukranian translation by Vitaly Mylo.
* Added Upgrade Notice section to readme.
* Warn if zlib compression in PHP is enabled.
* Added compression troubleshooting answer. Props Vladimir (http://blog.sjinks.pro/)
* Added Japanese translation by Tai (http://tekapo.com/)
* Updated Italian translation.

The biggest changes are the addition of the object cache and a small change to the php code that serves cached wp-cache files. If the mod_rewrite rules on your site don’t work for whatever reason the plugin will look for the Supercache file and serve that instead. An extra header is added to the served page when this happens. It’s all in the readme.txt!

WordPress MU 2.9.1.1

one dot one dot one dot one dot dot dot…. Yes, last week’s release of WordPress MU wasn’t to be the last one. This is. Really.

WordPress MU 2.9.1.1 fixes #1193 and #1195, two annoying but one liner bugs that crept into the last release.

This is also a security release fixing a bug in the installer that has existed for quite some time. If you can’t update yet, delete the file index-install.php immediately. That file is only used when you install WordPress MU for the first time so it’s not needed afterwards. Don’t ask, “I’m using version x.x.x, do I need to delete this file?” Just do it. Thanks Mad Sprat for reporting the problem.
The index-install.php in 2.9.1.1 is safe, but I’ve added a note at the end of the install recommending the file be removed. The file is not used after installation and it’s always a good idea to clean up unused scripts.

Get WordPress MU 2.9.1.1 on the download page or wait until your Dashboard upgrader finds the new release.
If you’re adventurous, download and replace the following files on your site to upgrade:

  1. index-install.php
  2. wp-admin/includes/mu.php
  3. xmlrpc.php
  4. wp-includes/version.php

Sorry Jeffro! 🙂

WordPress MU 2.9.1

WordPress MU version 2.9.1 has just been released.

This is probably the last release before it is merged into WordPress 3.0 as the merge has already started!

Anyway this release brings the new features and bug fixes of WordPress 2.9 and 2.9.1 into WordPress MU. My favourite new feature has to be the Trash can, but there’s also an image editor, plugins can be bulk updated and video embeds are easier to do.
If you have more than a few dozen blogs, be sure to add the commentmeta table first before upgrade.

Thank you to everyone who has helped make WordPress MU better over the years, either by helping on the forums, writing plugins, contributing code, working on Trac tickets or any of the other hundred and one other things that go into an open source project.

WPMU: Please add commentmeta first

I was going to announce WordPress MU 2.9.1 today but I knew that people would run into trouble with the missing commentmeta table if they didn’t upgrade their blogs immediately.

So, download add-commentmeta.txt, rename it to add-commentmeta.php and copy it into your mu-plugins folder. Login to your site as a Site Admin, visit Site Admin->Upgrade and upgrade all the blogs on your site. Make sure you’re using WordPress MU 2.8.6 as the upgrade script in older versions may not execute the plugin.

The script above will add the commentmeta table to each blog. Give it time because it will take quite a while on large sites. WordPress MU 2.9.1 tomorrow.

Some people don't feel the cold

The weather reading on my desktop computer says -3C, that’s the temperature at the local airport I presume. It’s very cold out, but the sun is out and at least there’s no wind.

I took Oscar for a walk, I’m all wrapped up against the cold with a thick warm hat and over that a hoodie (yes, they do have a use!) and finally a light jacket to keep all the heat in. I dodged the ice and enjoyed the lovely sunlight melting away the frost on exposed surfaces. The footpath wasn’t too bad, Oscar was enjoying himself.

Half way down the road I bump into a neighbour. He’s dressed for a totally different season! Apart from his usual black jeans, he had on a nice shirt, but the top two buttons were undone exposing flesh to the cruel winter cold, and his one concession to that cold was a light black jacket, not closed of course. He hurried past, commenting that, “the sun is very bright this morning isn’t it?”

Amazing.

WordPress MU 2.9.1 RC

WordPress MU 2.9.1 is almost ready but we need people to test it before the final release. This will be the final release before we start merging into WordPress so I’d love to get as many bugs as possible ironed out. Take a quick look at the tickets in Trac and see if you can fix any!

Check out revision 2044 or to get the latest code get it from trunk instead. If you’re not comfortable with Subversion access, there’s a zip file at the end of each page.

Only try this on a test server of course! The new version creates a new “commentmeta” table on each blog after you upgrade. That could be intensive on large sites. Ron points towards John’s script that adds those tables. I haven’t tried it yet (it’s a job for tomorrow!) but it’s definitely a good idea to create this table on all your blogs before you upgrade. Let me know how it goes.