Migration Patterns
Published 20 years, 4 months pastI’ve fielded a few questions about my experience migrating from Movable Type to WordPress, so I thought I’d address that subject for anyone else who might be interested. I didn’t migrate from Movable Type. I’ve never run Movable Type. Okay? That’s not saying anything for or against MT. I’ve just never used it.
What I was using before setting up WordPress was a completely hand-built system where I authored entries in an XML format of my own devising, in which every entry for a given period (say, all of 2004) was sitting the same file. Once I wrote a new entry, I’d pour the XML file through a set of XSLT scripts to generate the latest posts, monthly archive pages, and RSS feeds. This was accomplished with some dirt-simple shell scripts I’d put together. Here’s what the main script looked like:
#!/bin/bash MONTH="$(date +%Y%m)" echo $MONTH xsltproc -o latest.html xslt/latest.xsl archive.xml xsltproc -o rss20.xml xslt/rss20.xsl archive.xml xsltproc -o rss091.xml xslt/rss091.xsl archive.xml xsltproc -o $MONTH.html -stringparam chunk $MONTH xslt/chunker.xsl archive.xml
Anyone familiar with xsltproc will see what I’m doing at a glance. For the rest of you, here’s a quick explanation. The first xsltproc...
line runs xsltproc using the script at xslt/latest.xsl
(relative to the shell script) against the file archive.xml
, writing the result to the file latest.html
. That’s it. Nothing very fancy, but it worked well enough when I created the system.
Why did I abandon my loving crafed system for an installable package? A combination of factors, any of which would not have been enough on its own.
- The monthly archives were starting to get too heavy. For example, the archive page for March 2004 is 88KB, and that doesn’t count any style sheets, images, or other external resources that would have to be loaded on top of that. Back in the day, a month’s worth of posts would be maybe 15KB of HTML and text. Heck, all of my posts from 1999 and 2000 total a whopping 32KB of HTML source. My total posting from December 1999 through 2001 is about the same amount of data as the posts for March 2004. So I needed more flexibility in terms of post archiving, which meant things like per-post archives, which I didn’t really want to have to try to support via XSLT.
- I wanted to offer post commenting from time to time, and also have a system that managed pingbacks and trackbacks. I had very little interest in figuring out how to implement my own commenting system, so weblogging software was my best choice.
- An ability to search through the post archives was something I wanted to add, but for some reason I don’t want to do it through Google. I’m still not sure why… I just don’t.
So why did I migrate to WordPress, specifically? After looking at a number of packages, I decided that WordPress just fit me the best. I still don’t like having to go through a Web interface to write posts, as I’ve gotten very used to authoring in BBEdit, but that was going to be a hurdle no matter what. (And I do often write up a post in BBEdit before simply pasting it into the Web interface.) Here are some specific reasons:
- By default, WordPress generates valid XHTML files. Thus, the process of adapting its code to generate the valid HTML I wanted was a lot less painful than it would have been with a package that doesn’t generate valid markup by default.
- Similarly, WordPress is set up to handle site presentation via CSS, so it was a trivial matter for me to replace their default styles with my own.
- I like that WordPress is not only open source, but users are encouraged to hack on it and share their hacks, which I’ve already started to do. This was enough like a hand-built system to make me happy. I think of it as a stock car that I can tune and tinker with to my heart’s content.
- The new “Import via RSS” feature in WordPress 1.2 made sucking all of my back posts into the system really, really easy. I just had to create a full-content RSS file containing every post I’d ever written—pretty easy, given that I had them all stored in XML—and then point the RSS importer at the file. Well, two files, actually, but it still made the whole process very smooth. It read the publication dates, categories, and everything else of note in a matter of milliseconds. In fact, it was so easy I felt no regret about blowing away my test-site import and doing it again for the public site.
- It certainly didn’t hurt that one of the primary forces behind WordPress is Matt Mullenweg, a fellow GMPG founder, so I knew that if I really got stuck I could ask him for help.
So that’s why I switched away from my home-brewed system and onto WordPress. So far, aside from the occasional bouts of swearing at obscure MySQL and PHP syntax, neither of which has been anywhere near as migrane-inducing as XSLT syntax was, I’ve had no significant reason to regret the change.
Now you know… and knowing is half the battle.