Moving to WordPress

After twelve years of using Movable Type, I have just moved the blogs on sunpig.com to WordPress. For some time now, Movable Type has been failing two of my three tests for choosing a piece of platform software:

  • Is it well documented? (Yes.)
  • Is it under active development? (No, at least not in its open source version.)
  • Does it have an active and supportive user community? (Not any more.)

I still like its architectural model of static publishing, and (partly because of that) it has a great security record, which is important if you’re running your own server. I’ve been using MT since version 1, and I’ve clung to it for sentimental and pseudo-practical reasons (“I know the templating language really well!”) for a long time, but the online world is a much different place now, and the fact is that compared to all other avenues for writing online, MT 5’s interface is poor, and I dislike using it. As a result, I don’t. I blogged less in 2013 than in any previous year.

OpenMelody was a fork of the open source version of MT 4, but it seems to be dead now.

I was considering using Jekyll, which is a modern static site generator: write posts in your text editor, run a site generator from the command line, and `rsync` the generated html files to your server. This has lots of good points: it generates static files, and it plugs directly into my standard text editor workflow — with version control! This is great if you’re a programmer and always have access to a machine with a command line. Not so great if `bundle exec jekyll build` makes you twitchy, or if you like the idea of occasionally posting something from your phone. Also, no matter how you slice it, comments end up as a crazy hack. I can see myself using jekyll for other projects, just not for our main blogs.

Ghost is new and shiny and looks like it pushes the standard blogging interface forward, but: node + sqlite. Really? They sat down and actually came up with that decision? Also, I mistrust an open source project that has a “sign up” link on its home page, but not a “download”.

Drupal would probably do the job, but my impression is (perhaps incorrectly) that it is more geared towards sites rather than blogs.

So… WordPress. Big community, well documented, under active development. Used to have a bad rep for security, but is a lot better than it used to be, and since version 3.7 even features an automatic update process to apply maintenance and security patches. It also has well-established guidelines and practices for hardening an installation. It’s “the standard” these days. I have a general preference for “off-piste” solutions, but sometimes I just want to go with something that “just works”. Mostly.

It took me a few days to prepare the migration. I pulled the trigger yesterday evening, and by the (late) end of the evening, the new Death Star was mostly operational. Today has been mopping up and housekeeping. And so far, I’m feeling pretty good about it.

The new shiny:

I put together a GitHub repository with my notes, preparation, and migration scripts in case anyone else might benefit from the experience: https://github.com/sunpig/sunpig-mt-to-wp. If you notice any problems, let me know.

Movable Type 3.33, and associated FTP problems

Movable Type 3.3 badge-type thingSix Apart have just released a new version of Movable Type (3.33) which contains several patches for a bunch of potentially nasty security holes. Given the problems I had upgrading to 3.3 in the first place, I wasn’t exactly relishing the idea of another install, but security comes first.

And, just like last time: HTTP 500 server errors as soon as I tried to log back in afterwards.

It looks like my problem isn’t related to Movable Type at all, though, but instead to the FTP upload process. I had grabbed the .zip version of the movable type package, unzipped it locally, and then uploaded all the individual files to my web server. My FTP client is FileZilla, and the server is running NcFTPd. With FileZilla set to use multiple simultaneous connections (for a faster upload) it would occasionally transpose the contents of two files.

This is very ungood. Not only does this lead to the obvious failure situation where an app doesn’t work because its internals are screwed up (the HTTP 500 server errors I was seeing), but there’s also the possibility of a silent failure, where everything still appears to work, but all is still not well. For example, a file containing passwords could be swapped with a simple HTML file so that they become publicly readable (and Google-able).

Curiously, the transposing of files doesn’t seem to be entirely random. When I first noticed the phenomenon, I tried re-uploading the pair of files that had been switched, and they ended up switched again. It was only when I dropped back to using a single connection (menu: Queue -> Use multiple connections) that the upload worked properly.

A quick search on Google showed that although this is uncommon, it’s not an entirely unknown problem. A few people have mentioned this happening with FileZilla (here and here, for example), but this also seems to be an occasional problem with CuteFTP, too: see this forum post.

The fact that the problem shows up on multiple clients makes me wonder if it’s the server that’s at fault. Alternatively, both CuteFTP and FileZilla could be using a very similar, but subtly wrong piece of code to do multiple simultaneous uploads. Very curious. But at least knowing what has gone wrong will make me feel much more at ease when the next MT upgrade comes around.

Retiring entries with Movable Type

Okay, that idea I had about writing a plugin to add a “Retired” status for Movable Type entries? Not going to happen. At least not any time soon. The post status types are pretty well hard-baked into the core MT code, and adding a new status would require some hacking around in places like Entry.pm as well as additional plugin code. Modifying core files means re-modifying them every time you install a new version, and that’s just a pain.

(However, while digging around in the posting status area of the MT core, I found a bunch of dormant code relating to scheduled posting of entries. There is a posting status code of “Future” defined right next to “Draft” and “Publish”. On the other hand, there has been a status code of “Review” in there for some time, too, and it hasn’t appeared in the UI yet, either. It’s probably not worth getting excited about scheduled postings coming to MT in the next version.)

In the absence of a simple plugin, here is a relatively simple alternative way for “retiring” outdated entries in Movable Type.

Continue reading “Retiring entries with Movable Type”