WordPress is about democratizing publishing; that is to say it’s meant to be easy to use by anyone, whether they have technical knowledge or not. Jekyll, in contrast, is designed to appeal to developers. It allows you to treat your content as source code, employing familiar tools such as text editors and version control systems.
No more logging into wp-admin and clicking around to manage content. I can write blog posts from the comfort of vim. 1
No more worrying about making database and file backups. Everything is stored in git.
No more worrying about caching and scaling. Serving static files is a walk in the park for even the frailest of web servers.
No more keeping WordPress and plugins up to date.
No more ssh-ing into the server to work on the theme; develop locally using jekyll --auto --serve and deploy with a simple git push. 2
Comments are handled by Disqus. If you’re thinking “I would never entrust my site’s comments to a third party”, just keep in mind that they’re not your comments; they belong to whoever wrote them.
I did have to give up a few things outright: search, tag and date archives, oembeds, random quotes in the footer. They’re nice to have, but not essential.
For the migration, I used the wordpress-to-jekyll-exporter plugin. The design is a modified version of the wp-svbtle theme, ported to Jekyll.
I don’t know if it’s a post-CMS world, but there are definitely more options to choose from.
The chief lesson I have learned in a long life is that the only way to make a man trustworthy is to trust him; and the surest way to make him untrustworthy is to distrust him and show your distrust.
Henry L. Stimson
More and more people are realizing that git is awesome. Although the official WordPress source code still lives in an svn repository, you can contribute patches without having to touch svn ever again.
So, without further ado, here’s how you can generate and manage patches for WordPress Core (it assumes you’re comfortable with the command line).
1. Clone the official mirror.
There’s an official mirror of WordPress on github, so let’s use that:
git clone [email protected]:WordPress/WordPress.git wp
cd wp
2. Find a ticket to work on.
You can browse through existing tickets in trac or create a new one.
3. Make a feature branch.
Once you’ve got the ticket number, create a branch:
git checkout master -b some-feature/123
where 123 is the ticket number.
Now, make the code changes you need to make and commit them (you can do several commits; it doesn’t matter):
... edit some files...
git commit -am "fixed the bug"
... edit some more files
git commit -am "fixed edge case"
3. Generate the patch.
Here’s the clever part: you can generate an svn-compatible patch directly from git:
git diff master... --no-prefix > some-feature.123.diff
If you want to skip the --no-prefix arg, you can update your gitconfig:
git config --global diff.noprefix true
All you have to now is upload some-feature.123.diff to the trac ticket. Done.
Optional: Publish your feature branch.
If it’s a big feature and you want to get feedback on it – without having to upload a new patch each time you make a change – you can push your branch to github.
First, you need to fork WordPress/WordPress (there’s a button for that) and register that fork in your local clone:
git remote add scribu [email protected]:scribu/WordPress.git
After that initial step is done, whenever you want to publish a branch, you can just do:
git push -u scribu some-feature/123
WP-CLI is now at version 0.7.
Going forward, all announcements related to the WP-CLI project will be posted on the WP-CLI blog.
For an illustration of how people’s emotions drive technical decisions and opinions, read any flame war about anything, ever.
On Being A Senior Engineer
In the little experience I’ve had with programming in Python, I’ve found the defaultdict class to be one of the most useful.
PHP already has a limited version of this feature built in, called autovivification:
$arr = array();
$arr['foo']['bar'] = 1;
print_r( $arr['foo'] ); // Result: Array ( [bar] => 1 )
print_r( $arr['baz'] ); // Result: Undefined index: baz
As you can see, it doesn’t work when accessing an undefined value; when implicitly setting a value, you can only construct arrays.
Fortunately, it’s pretty easy to implement our own version of Python’s defaultdict by using the special ArrayAccess interface (requires PHP >= 5.3.4):
You use it just as if it were a regular associative array:
$counts = new Defaultdict(1);
echo $counts['foo']; // Result: 1
$counts['bar']++;
echo $counts['bar']; // Result: 2
And you can even pass an anonymous function for constructing new default values:
$instances = new Defaultdict( function( $key ) {
$value = new stdClass;
$value->id = $key;
return $value;
} );
print_r( $instances['bar'] ); // Result: stdClass Object ( [id] => bar )
A few days ago I made a little flowchart describing how, given plugin X, you could determine if it was conflicting with some other plugin Y, or with your theme.
It seems to have really taken off on twitter, so I’m posting it here as well, for safe keeping:

There’s also a Japanese version.
It seems I went over the process of figuring out why a plugin is broken before.
I was invited to speak at WordCamp Lisbon 2012, so I gave a talk about Posts 2 Posts, entitled Connecting The Dots. There’s also a video (my talk starts at around minute 48).
On the hack day I did a presentation about how to contribute to WordPress Core. Since it was an ad hoc thing, I just borrowed Andrew Nacin’s slides. :-)
Besides the being-in-Lisbon (which is fantastic) and the after-parties, the hack day was the big win for me. I geeked out with Bruno Carreço, a colleague from AppThemes. Also, I participated in a productive discussion about how to properly implement a plugin for multilingual sites; I hope Remkus sees it through.
Ignoring the two missed flights, it was a great experience!
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Refactoring
The major new feature in this release is the long awaited checkbox mode:

As a bonus feature, there’s now a `` template tag which will display the number of items for that term. This was contributed by khakulov. For a usage example, see templates/list-item.html.