WP Super Cache 0.9.9.8

WP Super Cache is a full page caching plugin for WordPress that makes your website run much faster!

Version 0.9.9.8 has been released and has a number of bug fixes and changes including:

  1. CDN updates: it can be switched off. Multiple CNAMEs can be used for serving static content to improve performance.
  2. Uninstall process improved. Files that the plugin creates are removed, and the wp-config.php and .htaccess files are fixed. If the plugin can’t do any of these steps it will display a message explaining what to do.
  3. Cached dynamic pages can now be stored in Supercache files and compressed. No need to use legacy caching any more.
  4. 1and1 Webhosting fix. They use “/kunden/” in some of their paths but not others.
  5. I removed the “log by email” functionality as it caused problems for users who were inundated by email.
  6. Many more minor fixes and changes.

The old uninstall process has been completely revamped. Now all you need to do is deactivate it on the plugins page. It will then remove wp-cache-config.php and advanced-cache.php. It will also remove the extra code it added to wp-config.php and the .htaccess file. On the off chance it can’t remove those files it will print a helpful message asking you to fix the problem. Unfortunately this class of plugin (full page caching plugins) are by design more complicated than regular plugins and are more invasive.

Got a problem with the plugin? Use the support forum please. Support queries posted here may be ignored or deleted.

cSprites for PHP 5.3.1/2

Joost posted a great article on reducing http requests on WordPress sites recently and one comment caught my attention. Nabil mentioned cSprites. It’s a WordPress plugin that merges the images in your posts into one file and uses CSS to position the single merged file in place of the original images. Here’s a good post explaining how this technique works.

Unfortunately it hasn’t been updated in over a year, and the current version doesn’t work if you have PHP 5.3.2 (and probably 5.3.1) as it trips over this PHP bug. The fix is simple, get rid of call_user_func_array() and call the functions directly.

I had it installed here and it worked well enough but not perfectly. Here’s the post I made on the plugin’s support forum if anyone’s interested.

I don’t think the author will update the plugin again and in fact he’s looking for someone else to take over. Anyone?

The plugin has been running on my photoblog for the last hour ago and I haven’t noticed any problems yet. As a bonus, it also stops people right clicking and stealing saving my photos for their own use. I’ve since removed it as visitors were only seeing blank images. Oh well.

So, want to give a “fixed version” a go? Grab csprites-for-wordpress.zip and install it in the usual way. Support queries should be directed towards the plugin support forum. 😉

Oh yeah, there’s also the SpriteMe bookmarklet if you don’t want to go fiddling with WordPress plugins!

Better uninstall for Supercache and other things

I need your help. Go grab the development version of WP Super Cache off the download page and give it a whirl. I’m working on making the uninstall process less painful than it is in the current release.

I added an action on the deactivate hook for the plugin so when you deactivate it on the Plugins page it deletes the files the plugin created and removes the WP_CACHE definition from wp-config.php. It doesn’t yet remove the mod_rewrite rules from the .htaccess file though. Sometimes people put the WordPress rules in the same block of that file so removing the rules would stop the site serving requests! I will of course gladly accept code patches to do that job.

No more messing with uninstall.php now, just deactivate on your plugins page.

Besides that, the CDN page has an on/off switch and can use multiple hostnames now. The cache can be cleared when caching is disabled and dynamic pages can be served by using PHP mode rather than the slower “legacy mode”.

There are also numerous bug fixes so if you have a development site and a few minutes to spare why not give this a go? Please?

WP Super Cache 0.9.9.7

WP Super Cache is a full page caching plugin for WordPress that makes your website run much faster!

I’ve just released a new version and the biggest change in this one is the addition of Content Delivery Network (CDN) support thanks to Mark Kubacki who allowed me to integrate his OSSDL CDN Off Linker plugin. (Please go visit his blog and say thank you if you use this feature!)

The CDN support simply rewrites images, CSS and Javascript files so they point at a different hostname. That hostname can be another virtual host on your own server (aka “Poor Man’s CDN”) pointing at your WordPress install or a fully fledged CDN. If your CDN supports “origin pull” then all the files on your server will be copied there as they are requested by visitors. Otherwise you’ll have to transfer the files over manually.

Apart from that, bugs have been fixed, a few features have been tweaked including the uninstall script which has been streamlined somewhat.

I also added links (on the “Easy” settngs page) to some plugins and tools you may find useful in making your site run faster.

Problems? Go to the forum and someone may already have had that problem and solved it. If not, post there and you’ll get a reply.

WP Super Cache and mod_pagespeed

So I finally got a chance to try mod_pagespeed on this server. I particularly wanted to know if it behaved well with WP Super Cache as I’d read reports that it causes problems.

Unfortunately those problems are real but I’ve been told that a new release will be out shortly to address a few bugs so perhaps this will help.

If you’d like to try mod_pagespeed make sure you disable compression in WP Super Cache and clear the cache first. Even though the docs state that the module always generates uncompressed HTML it appears to do the opposite. In fact, it tries to load mod_deflate:

# more pagespeed.load
LoadModule pagespeed_module /usr/lib/apache2/modules/mod_pagespeed.so

# Only attempt to load mod_deflate if it hasn’t been loaded already.
<IfModule !mod_deflate.c>
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
</IfModule>

When things were working, supercached files were processed by mod_pagespeed correctly, I noticed inline Javascript was modified to remove whitespace and I presume other changes were made too but I already minify things and have static files off on another domain so perhaps the changes made on my pages are less minimal.

The changes made by mod_pagespeed, like minifying inline Javascript, are not cached by WP Super Cache so your server has to make these changes each time a page is served. I know that mod_deflate does not cache the gzipped page content, but zips up the page each time it’s served. Mod_pagespeed does however provide a caching mechanism so there’s a good chance those changes are cached there. I haven’t looked at the code so I don’t know.

I did have problems with dynamic pages. A simple phpinfo() refused to load quite often, and backend requests sometimes became stuck. Load on the server sky rocketed occasionally, usually when the module cache directory was emptied.

For now I’ve turned mod_pagespeed off but that might change as this is a young project and maturing fast! I’ll update this post whenever this happens.

More plugins releases soon

WP Super Cache, Domain Mapping and Sitewide Tags are all getting quite some attention.

Ron and I have been busy with Domain Mapping and Sitewide Tags.
A new version of Domain Mapping was released a few days ago with a couple of bug fixes and also a new feature that allows you to ignore the “primary domain” on your blogs. It has the potential for duplicate content if a blog can be found at multiple domains but some people need this feature. With careful organisation of content this can be avoided.

Sitewide Tags is almost ready for a new release. Ron added thumbnail support last week, and I checked in code last weekend to fill in the tags page with posts made before the plugin was installed. It needs testing, and if you’re any good at PHP please take a look at the development version on the download page.

WP Super Cache has had a number of bugs squished, preloading works better – it cancels immediately when you click that Cancel button. It also prints the url of the current post being preloaded which is handy if you’re not sure it’s working or not.
I added some extra debugging to make sure the homepage is cached correctly, but you have to enable “extra paranoid checks”. It works fine on my sites but I would really appreciate feedback if you have WordPress installed in a directory, installed in a directory different to where the site is or whatever configuration you might have. If it doesn’t work, the only side effect is that the homepage won’t be cached so it’s easy to spot when there are problems. I want these checks to be active all the time when the new version is finally released so it’s important this works correctly. Grab the development version from the download page and give it a whirl!

Don’t worry about upgrading when the next versions of Super Cache and Sitewide Tags are released. The version number in the development version is the same as the current release so a new version notice will still appear on your dashboard.

I almost forgot. Cookies for Comments has been worked on too! I added code that keeps an eye on how long a visitor reads a post before they post a comment. If the comment is made faster than a certain time the comment is automatically caught. I’ve used it over the weekend here and elsewhere and it’s catching a good number of “real looking” but spammy comments! The development version on the download page is what you’re looking for if you want to try this.

I think I need a P2 blog to post these sort of updates. Blog titles are such a pain sometimes.

Easy Setup for WP Super Cache

One of the things that has bugged me about the WP Super Cache settings page was how it was laid out. Well, the next version of the plugin will display a simplified settings page to new users. If you’re upgrading, you’ll get the same old page as ever, don’t worry.

This version also adds a new method of serving cache files. It uses PHP, but serves supercache files. So, it’s a halfway house between using mod_rewrite (difficult to install for some users), and the legacy caching of WP Cache. That caching will be what is activated for users who use the simplified settings page.

There are lots of other bug fixes. The cache tester works if WordPress is installed in a sub directory, the admin page is separated out into tabs now to make it easier to find things. Error messages show up as “update messages” at the top of the browser now, making it easier for new users to figure out when mod_rewrite rules need updating and when other house keeping tasks need doing.

The code is red hot, liable to bend and break and may cause problems but it works fine here and on a test multi site install but I need testers to hammer on it and do things I don’t expect. If you’re brave, grab the development version off the download page. Thanks!

Tweet Tweet dives into the past

I overhauled my Tweet Tweet plugin for WordPress yesterday so it would work with the new Twitter OAuth mechanism. This morning I made it possible to download your older tweets, up to the max limit of 3,200 tweets that Twitter allows.

It’s still a work in progress but I want to get a new release out as soon as I can for current users who are using the basic auth that doesn’t work any more. If you’re feeling adventurous give the development version on the download page a go and tell me what you think!

99% of the OAuth code was ripped from Alex King’s Twitter Tools which in turn uses Abraham Williams’ twitteroauth.php library and OAuth.php from oauth.net. Thank you all for doing the heavy lifting required!

WIP: the Super Cache admin page

A small update, I’m slowly working through the WP Super Cache admin page in an effort to make it better. You can in fact download the development version if you want to follow along.

What you see above is my first pass. An effort to make the first options section match the look and feel of the standard Settings pages in WordPress. It’s all likely to be mixed around and moved about before the next release, so please, dig in and lend a hand!

The MU forums are moving

The MU forums will shortly be closing up shop.

WordPress 3.0 integrated everything that MU always did so it’s better to consolidate the forums too. There’s a MultiSite forum on WordPress.org and any queries about upgrading or problems using WordPress 3.0 should go there.

The old forums aren’t going anywhere but later today or perhaps tomorrow I’ll be making them read-only. You’ll still be able to browse the forum, and Google will still index the wealth of information already there but posting will be disabled.

So, thank you to everyone who contributed to the forum over the years. You helped make WordPress MU great.