Looking at a WPMU Object Cache

In the good ol’ days WordPress came with a filesystem object cache but it was removed some time ago because it was a pain to maintain, and caused problems for some users, especially those using NFS. Nowadays there is an object cache built in, but the cache only survives for as long as a page is being served.
Other developers have taken up the challenge and produced object cache plugins to fill in the gap. There are the neosmart ones including a filesystem object cache and a memcached one (Read Andy’s notes before installing).

The neosmart filesystem object cache (and the others according to #988) don’t work correctly with WordPress MU so I dug up a patched version of the filesystem object cache I worked on a year ago to look for testers.

Download object-cache.txt, rename to .php and copy into wp-content/. It should start working automatically but if you don’t see files and directories in wp-content/cache/, make sure that directory is writeable by the webserver.

The neosmart version on which this one is based doesn’t handle switching blogs at all. Cache collisions occur with data from one blog’s options polluting the options in others. The version linked above should fix that but I’d appreciate some testing by others.

Oh, check out WordPress MU trunk now. I merged WP 2.8 beta1 and I’m fixing bugs. Please install and try it out on a test server! The get_option() and related code is using the same code as WordPress.org which is one of the main reasons I went digging into the object cache. It leans a lot more on the cache than previously. Please test!

WordPress MU 2.7.1

WordPress MU is a multi user or multi blog version of WordPress that can be used to run sites like WordPress.com.

This release of WordPress MU has been much delayed but I think it’s been worth the wait. Included in this release are a number of new features and many bugfixes. Get it from the MU download page.

Update! In the final rush to get this post written I neglected to add that this release fixes a vulnerability in the importer system that would allow an untrusted user to run PHP code. Thanks to Alexander Concha for discovering the vulnerability and to Barry Abrahamson who recognised that some servers treat unknown file types as PHP scripts.
One more reason to upgrade.

New features and changes include:

  • A revamped plugin system thanks to Andy Peatling. Plugins installed in the plugins directory rather than mu-plugins can be activated and deactivated on all blogs with one click.
  • The admin bar was removed. It’ll be stuffed into a plugin instead. Must talk to Viper007Bond about that.
  • A new “My Blogs” page where a user’s blogs are listed and personal “per blog” settings can be configured. It’s empty right now but it’s easy to add settings to it via plugins. Imagine having a different “Display Name” on each blog you write on! See SetupMenu and HandleFormPOST in the just removed admin bar for example code. That code uses actions rather than filters but it’ll get you started.
  • The site admin can now set a Global Dashboard blog for users who don’t have blogs. Those users will be added to this blog rather than the main blog. The default role of users on that blog can also be set but if they’re not “Subscribers” they won’t be moved if you change the Global Dashboard.

They’re the major changes. Smaller changes include notification of failed blog upgrades [1728], MU will now ignore free space checks when importing posts [1725] and lots more. Check out the timeline for further details.

If you’re running WordPress MU 2.7 you can upgrade from inside the Dashboard. The system will notice that a new version is out and will lead you through the upgrade process, just like in regular WordPress. Plugins can be updated as well through the familiar plugin upgrade process as long as your plugins are hosted on the WordPress.org Plugins Database.

As always this release would not have been possible without the help and encouragement of many people along the way. I know I’ll leave out someone if I try to list everyone but I appreciate all the help people give working through tickets, and helping on the forums.

PS. WP Super Cache was updated today too. New features include an option to stop caching for logged in users, it doesn’t cache previewed posts, and it displays cache size summary information on the admin page now.
PPS. Happy birthday Adam! 2 today and Dad’s finally getting away from the computer now! 🙂

WordPress MU 2.7.1 beta 2

WordPress MU is a multi user or multi blog version of WordPress that can be used to run sites like WordPress.com.

The 2.7.1 release is very close now. I have just uploaded wordpress-mu-2.7.1-beta2.zip for your enjoyment.

2.7.1 has taken longer than usual to come out, mainly because of the large number of bug fixes and new features in this release. Highlights include:

  • A revamped plugin system thanks to Andy Peatling. Plugins installed in the plugins directory rather than mu-plugins can be activated and deactivated on all blogs with one click.
  • The admin bar settings can be customized by any user for each blog via the “My Blogs” page. The code here is still rough, and may not make it into the final release. Please help clean it up!
  • The site admin can now set a Global Dashboard blog for users who don’t have blogs. Those users will be added to this blog rather than the first one.
  • And many more bugfixes you can read about on the MU Timeline

I think this release is just about good enough to put on a production server, but test it first on a development server and backup your old install if you’re really paranoid. All I’ll guarantee is that this software will take up space on your server. I need your help to test it.

If you’re a jQuery fiend or CSS styling guru, your help with the “My Blogs” page would be very much appreciated. My ugly code hides settings that aren’t relevant, but the page isn’t pretty. Use Trac or contact me through this site if you have ideas or code to contribute.

I’m glad to say that once MU 2.7.1 does come out. Upgrading from 2.7 should be as easy as clicking the Upgrade button in the dashboard. I tried upgrading from 2.7 yesterday and my test server upgraded itself after 1 or 2 false starts.
‘Course, if you’ve modified core files (naughty!), those changes will be overwritten and you’ll have to manually upgrade.

Thanks to everyone who helped me with patches, code snippets, ideas and with ticket updates on Trac.

WordPress MU 2.7

After a lengthy delay, WordPress MU 2.7 is now available. WordPress MU is the software that runs on WordPress.com and many other sites.

This is a sync of the code from WordPress 2.7 released last December. It’s taken a while but I think it’s worth the wait as there are many bugs fixed. Besides the merge with WordPress 2.7 there are also a few new features, including Viper007bond’s admin bar which is the most user visible addition.
Check the timeline for further info.

Upgrading from WordPress MU 2.6.5 should be as easy as copying over your existing install but please backup everything. Blog databases must be upgraded but that will occur in the background as usual.

I would really like to thank everyone who helped me bring this release out and offered me encouragement along the way. I’d name names but I’m bound to miss someone! It’s great hearing what everyone is doing with WordPress MU. There’s quite a community out there!

WordPress MU 2.7 beta

A beta version of WordPress MU 2.7, the multi blog version of WordPress that runs on such sites as WordPress.com has just been uploaded and is available here.

This is quite a stable release and has been tested by many but it’s not the final 2.7 release so there are probably bugs we haven’t found yet. Don’t put it into production just yet, but if you’re working on a new site, you’re better off using this rather than 2.6.5 as the final WordPress MU 2.7 will be along soon.

Check the timeline for more info, there are still plenty of open tickets and keep an eye on the forums and please help out if you can.

I also want to extend a big thank you to everyone who has helped with this release, be it entering tickets, updating them, creating patches, or helping out on the forums and of course the WordPress community. This software wouldn’t be where it is today without you.

WordPress MU 2.6.5

The beauty of Burnham Beeches

WordPress MU, the multi blog version of WordPress that runs on such sites as WordPress.com has been updated to version 2.6.5 to address an XSS vulnerability in the feeds offered to users.

More details will be forthcoming but for the time being, there’s also the WordPress.org announcement post.

This release also has a number of bug fixes, including a fix and improvements to rss caching. This is a required upgrade, so please install it as soon as you can.

After you’ve upgraded, check out the nominations for the 2008 WPMU Awards and vote for your favourite!

In related news, a new version of WP Super Cache is also available. This version hopefully fixes:

  1. Issues with clients seeing compressed pages incorrectly
  2. Cache clean up
  3. Warnings if Apache modules are missing
  4. Better support for WordPress MU. The wp-content/cache/.htaccess rules are now displayed on the admin page
  5. Better documentation on file locking
  6. WP Cache files are written to a temporary file first
  7. Use WP_CONTENT_URL in mod_rewrite rules generator

It also adds a number of filters:

  1. “supercache_dir” filter so the supercache directory can be manipulated. “wp_cache_key” cache_action to modify the key the wp-cache file is named after. Using both of these should make it easier for plugin authors to manipulate the cache based on user agent or other criteria. ie. iPhone theme? Unfortunately .htaccess rewrite rules will have to be updated manually.
  2. Added “wpsupercache_buffer” filter so the current page can be manipulated before being stored in the cache.

WordPress MU 2.6.3

WordPress MU, the multi blog version of WordPress that runs on WordPress.com has been updated.

Version 2.6.3 has just been released. This is a security release and a required update. More details about the vulnerability in the Snoopy library that WordPress uses can be found on the WordPress 2.6.3 announcement.

This release also includes a number of minor bug fixes but if you want to fix the Snoopy bug alone, it’s sufficient to update these files:

Those are not download links, click through and download the files using one of the links at the end of each page.

Otherwise, updating from 2.6.2 is as simple as overwriting your current install.

WordPress MU Sitewide Tags Pages 0.3.1

One of these days I’ll rename all my plugins and give them nice snappy titles.

Version 0.3.1 of the Sitewide Tags Pages plugin (for WordPress MU) has just been released. If you’ve been using this plugin you should probably update because this fixes a number of bugs including the problem with the Prologue Theme (and possibly Feedwordpress but I haven’t tested that.)
This release wouldn’t have been possible without the help of Thomas Schneider!

Main changes:

  • Pages are now filtered out because they don’t really fit neatly anywhere in the global posts page.
  • Prologue Theme problem with wp_insert_category() is fixed.
  • Set comment and ping status of global posts to closed.
  • Lots of translation work, including a German translation.
  • Lots of fixes related to when blogs change status, or posts are edited.

Grab it from the download page.

WordPress MU 2.6.2

WordPress MU, the multi blog version of WordPress that runs on WordPress.com has been updated.

Version 2.6.2 is now available for download and is a required update. WordPress MU isn’t vulnerable to the security bugs that were the reason for WordPress 2.6.2 but it does contain a number of important bug fixes, including:

  1. xmlrpc.php works better if you use multiple sites. #735
  2. get_option() wasn’t reading all options.
  3. Configurable media buttons on the Write page. #598, #738
  4. 404 “file not found” errors on folder installs is mostly fixed. #745
  5. And more .. (timeline)

PS. Don’t forget the voting is now open in the WordPress MU plugin competition.
PPS. Registration is now open for BarCamp Cork II on November 1st. I’ve put my name down to give a talk there.

WordPress MU 2.6.1

WordPress MU version 2.6.1 has just been released. This is a sync of the WordPress maintenance release that saw the light of day a few weeks ago.

This is a required upgrade as it fixes a number of critical bugs, particularly in deleting users and blogs. Upgrading is as easy as copying over the files of your current install.

For a more comprehensive list of changes, check the timeline, but in short, yes you do need to upgrade!

WordPress MU is a multi blog version of WordPress that runs many sites such as Linux.ie Blogs and WordPress.com. If you run the single blog version of WordPress you can probably ignore this message.