Force WordPress Auto-Update

I was excited to try out the new auto-update feature in WordPress 3.7.1. But the first attempt failed, since I had an old .svn directory sitting around. Deleted that, then waited… days. Communicated with one of the core devs on Twitter, who said that this first rollout was intentionally slow, to get things up to speed.

Finally got tired of waiting and decided to take matters into my own hands. Didn’t want to click the Update button – that would be cheating. Discovered there’s a new function call: wp_maybe_auto_update() that triggers the process that’s supposed to run via wp-cron.

So to trigger it from the command line, all you have to do is to create a small script in your WP root directory that bootstraps WP core and calls the function:

  // request-update.php
  require( dirname(__FILE__) . '/wp-load.php' );

With that in place, run:

php ./request-update.php

Wait a few seconds, and your site should be updated. Check the Updates page in your Dashboard and confirm that you received the update email, and Bob’s your uncle.

SoloMail, WordPress Mass Management

There are a number of plugins out there designed to scan a WordPress site on a periodic basis (e.g. nightly), grab all the recent posts, and tidy them up into an email digest. Heck, I even wrote one of my own a few years ago. Some work as WP plugins, others scrape RSS feeds.

But none of them let you hand-pick the posts you want to send by email, none of them let you “send now” and few of them provide good controls for managing the HTML/CSS of the email template. So I decided to write my own. SoloMail uses the excellent PHPMailer class, which is now included in WordPress core, and provides a simple checkbox on post views that lets you “Send now.” The current post is wrapped in a completely customizable HTML email template, and sent either to all registered users of the current site or to an external mailing list (preferred).

SoloMail is now available in the official WordPress plugin directory – get it here or see the post at Scot Hacker’s Scripts and Utilities.

To see it in action, subscribe to Birdhouse Updates.

Also: I’ve been hearing from developers who want to extend or improve the WordPress Mass Management Tools collection, so I’ve made it an open source project and posted it on github. Go for it.

Is WordPress Killing Web Design?

Loose notes from SXSW 2010 session: Is WordPress Killing Web Design

Good question – I’ve been asking myself this lately. Unfortunately the session quickly devolved into a lot of platitudes and stating of the obvious. Yes, design has been commoditized and is no longer an “elite” activity. Yes, your site is as creative as you make it, it has nothing to do with the CMS you use. All pretty much goes without saying. Took notes for half an hour, then headed to the HTML5 discussion… which was full and not allowing more people in.
Continue reading “Is WordPress Killing Web Design?”

Birdhouse 960

960 Blog look different? At first glance, not by much, but I’ve just completed a massive cleanup of the back-end, replacing the old HTML/CSS with the 960 Grid System, starting with the 960bc (blank canvas) WordPress theme. While I was at it, took the opportunity to search/replace out a bunch of old non-semantic code buried in the posts, updated or replaced a lot of plugins, and killed off a few old features that had out-lived their usefulness.

The biggest news: After years of preaching the HTML validation gospel to students, I still hadn’t gotten around to trying to make my own platform validate… but the Foobar Blog finally does! Well, almost. There will always be 3rd party code outside your control that can’t be hammered into shape. The biggest offenders here are embedded Flickr slideshows and WordPress’ own embedded Gallery feature. Ugh. But aside from that, we’re pretty darn close to clean. Everything I can control validates at least.

The old design had accreted slowly over the years, from a patchwork of parts built and gathered. Original intention was to go for a clean break and adopt a modern 3rd-party theme, but the more I searched, the more I felt like I loved the “Cheap Thrills” design that’s evolved here (not available for download, sorry). So I decided to port Cheap Thrills to 960. It wasn’t all roses, since the divs in this theme hug each other so tightly, while 960 assumes margins everywhere. A lot of fiddling with negative margins, and I haven’t  solved the equal height divs problem quite yet. Will do soon.

New in this pimplementation:

  • Much wider content area. Goal is to be able to show full-width video and slideshows, plus code samples that don’t fold to the next line or stretch out of the content space.
  • Syntax highlighting for code samples (example)
  • Tag cloud (see sidebar) – I’ve been tagging random articles for a long time but didn’t want to display a cloud until there were enough of them to warrant it. Still haven’t gone through and tagged the entire site history, but the cloud is picking up steam.
  • General cleanup. Cruft removal. So. Much. Cruft.
  • Somewhat wider sidebar – more room for Image from Nowhere and Recent Comments. Some of the old Images from Nowhere look a bit stretched but future ones will be generated larger.
  • Replaced my old handmade RSS-based Twitter integration with Twitter for WordPress. Super clean – much better for DIY theme builders than the usual TwitterTools.
  • The old Democracy plugin for polling appears to have been abandoned. Replaced it with the much cleaner WP-Polls, which also meant manually copying all of the old Poll data into the new system (ugh!). See the Pollster section.
  • Replaced the old contact form  in the shacker contacter with the much simpler Contact Form 7.
  • Nips and tucks galore.

Process took way longer than expected of course – everything does – but these things had been gnawing away at me for a long time now. Feels great to have it all done. Haven’t done any cross-browser testing yet – let me know if something doesn’t look right for you.

Can’t say enough good things about 960 Grid. We’ve standardized on it at work, and it really does make life easier. Not without its warts, but much more pleasant than the YUI grid it replaces.

Get Your Twitter Timeline into WordPress

After Twittering for a few months, I started to feel uncomfortable about not owning my data, and wanted an automated way to store a copy of each Tweet for posterity. Another installation of WordPress would be perfect as a Twitter backup repository (alternatively, you could copy all of your tweets to a dedicated category within your main WP installation, but I chose to do it in a separate install, since I wasn’t looking for integration with my main blog.

There were really two problems to solve:

1) Have new Tweets automatically hoovered into the WP backing store.
2) Get all of my older Tweets ported into the system as well.

Here’s the resulting site. It’s not really intended for public viewing – I don’t care if people browse it, but it’s really just a backup system in the form of a WordPress site.

Part 1 is pretty easy; Part 2 was more complicated. Here are recipes for both procedures.

Continue reading “Get Your Twitter Timeline into WordPress”


My WP-Mass-Upgrade script has saved me countless hours over the past year. Making sure all Birdhouse and J-School WordPress installations are managed via subversion has meant I’ve been able to wrap them all in a single shell script. When new releases emerge, I’m able to upgrade 50+ installs in a few minutes. The most time consuming part remaining was creating new installations when customers needed them. I had the process down to around five minutes, but knew the repetitive steps could be distilled into a script, so recently wrote WP-Create:

Super fast (~30 second) way to install WordPress for clients, via subversion. Yes, users can often self-install via Fantastico or similar programs, but what guarantee do you have that they’ll upgrade as soon as new releases become available? Letting users run old versions of web software is a great way to get hacked. Take control of users’ installations by checking them out via svn (with this script) and managing them with wp-mass-upgrade.

This script performs the following tasks:

  • Gather installation info
  • Create install dir and check out a copy of WordPress
  • Create database, db user, set db privs via external .sql file
  • Create WP config file
  • Create upload dir and set filesystem permissions
  • Generate array line for

Final setup is done via browser.

Added these tools to the WordPress codex section on managing WordPress via subversion.

Music: The Staple Singers :: For What It’s Worth

Scripts and Utils

Over time, I’ve built up a handful of shell and PHP scripts, written to satisfy various itches with WordPress, Movable Type, QuickTime Streaming Server, hosting performance, etc. I’ve been tossing them into a dorky static site in case they prove useful to anyone else.

I’ve been meaning for a while to drop them into a WordPress installation – a little software library, open for discussion. Finally got around to doing that: scot hacker’s scripts and utils. Not much different from the old site, but now includes commenting, categories, search, RSS, etc. Using the badly named but very clean WP-Candy theme.

One of these days I’ll have to dig up all my old BeOS scripts and utils and give them a permanent home.

Music: Essential Logic :: World Friction

WordPress Patch Committed

Wpicon Woo hoo! Last June, while trying to convert a Movable Type site to WordPress, I struggled to come up with a way to get the site’s existing tags, stored in the MT “keywords” field, converted to native WordPress meta fields during import. Finding no workable recipes in the wild, realized I was going to have to modify WordPress’ MT importer directly. Took a bit of hacking and experimenting, but eventually got it working. Decided to share my mods back with the community by contributing a patch to WP Trac.

Months passed, nothing happened. In WP 2.3, WordPress gained native tagging support and I found myself facing a similar problem, needing to convert MT keywords directly to WP tags. Modified the importer again, re-contributed my patch, and… nothing happened. Then, last night, just a week or two before the release of WordPress 2.5, received notice that my patch has been committed to trunk. Fewer than ten lines of code, but it’s my first tangible contribution to an open source project (beyond helping with documentation and plugins, etc.)

A small deal, but I’m proud.

Music: Talking Heads :: Born Under Punches (The Heat Goes On)

Notes on a Massive WordPress Migration

Cdthome At the UC Berkeley Graduate School of Journalism, we use WordPress heavily as a content management system for student and organization publications, knowledge bases, student handbooks, podcast publishing systems, online magazines, etc. Over the past couple of years, I’ve found again and again that WP is not only up to the task of serving as far more than a blogging platform, it’s a great content management system for many types of sites, once you learn a few tricks.

Just wrapped up a marathon coding session, converting one of the J-School’s most popular sites, China Digital Times (CDT), from Movable Type to WordPress. We launched the new site (with a new design by Devigal) a few days ago. This was by far the most complex WordPress installation I’ve worked on, involving around 16,000 posts and 6,000 tags. As with every site launch, I learned a few things in the process. Thought I’d post some notes here for the sake of others going through a similar process.

Nutshell version: Though SixApart (who make Movable Type) claim that their static page generation approach is great for high-performance sites, we’ve reduced the time it takes to publish a new article from almost 15 minutes to a few seconds by moving from Movable Type to WordPress.
Continue reading “Notes on a Massive WordPress Migration”

Crestshot-1 Birdhouse Hosting welcomes – the web site for Miles’ K-5 cooperative in Richmond, CA. I inherited the site a few months ago, and bid for the opportunity to host it at Birdhouse. Converted the site from Joomla to WordPress a month ago, then got started on a new design. The new look is based on the excellent Mimbo theme (though the end result barely looks related). Even had the opportunity to contribute a few tidbits to the WordPress Codex in the process.

Music: Nellie McKay :: Oversure