Moving Movable Type

After a few years of dragging my heels, I finally bit the bullet and upgraded Movable Type yesterday— from 3.16 to 4.31, skipping several generations of the software that have come in between. It was either that or switch to WordPress, and I thought I’d give MT one more try to see what the new one can do. It was a surprisingly painless process, but hunting around for instructions on the interim steps took a while—most people have long since left MT3.x behind. I thought I’d post what I found here, in case anyone else is still looking to do the same.

The process was complicated by my never having moved the back-end from Berkeley DB to MySQL, so the first step was to create a new MySQL database on my server for that purpose, then to follow these instructions hidden in the SixApart archives. One thing I needed to do was track down my old zip file with the 3.16 package and look in it for mt-db2sql.cgi, which I hadn’t uploaded to the server back in the day. With that uploaded and made executable along with its partner file mt-db-pass.cgi, I was ready to go.

The conversion went off without a hitch—fortunately I didn’t need to use these modifications for people with particularly large databases, thanks to my habit of making new blogs for each year and freezing the old ones as static files so I could remove them from the database. The conversion even cleaned up a weird ghost double of one of the blogs in the database, which was handy. Now I was ready for the bigger move. I’d uploaded the files for MT4.31 into a new folder alongside the old MT3.16 folder so that I could keep the old one on hand in case the move didn’t work. One of the nice things about this process was that my old Berkeley database was still intact, too, as it wouldn’t be touched in the changeover. (Naturally, I’d made backups of all of these as well.)

One file that needed moving across from MT3.16 was mt.cfg, as modified to reflect the new MySQL settings. I saved a copy of this, changed the name to mt-config.cgi, inserted a line with DBPassword (to replace mt-db-pass.cgi), and uploaded it into the MT4.31 folder.

Now it was just a case of making sure all the new CGI files had their permissions set to 755, changing the names of the two MT folders so that the old one became the back-up and the new one became the main MT folder, and pointing my browser at the usual location of mt.cgi. Movable Type 4.31 identified the need for an upgrade automatically and performed it without a hitch. So that’s it; I’m now safely in the new version, wondering where on earth everything is... nah, it’s looking fine so far, and seems to have lots of useful new features.

I’m not sure how it’s going to handle the old 3.16 templates, and this post is partly a test of that. Over time I’ll look at modifying them to use more of the features of MT4.x, but one thing at a time...

13 September 2009 · Site News

Let’s test the comments while we’re at it.

Added by Rory on 13 September 2009.

Okay, the comments count has broken and so have the links to the monthly archives. So I won’t be able to put off tweaking the templates after all.

Added by Rory on 13 September 2009.

Fixed the comment count, but the monthly archive links still don’t work. Individual and category ones do, but those don’t. Weird.

Added by Rory on 13 September 2009.

Hey, adding a comment still isn’t updating the count automatically.

Added by Rory on 13 September 2009.

Had to republish for it to update. Hmm.

Added by Rory on 13 September 2009.

Another test comment. MT4.x is sending me blank emails whenever a new comment is added, rather than the full comment in an email as it did before.

Added by Rory on 14 September 2009.

Solved the archive links problem, phew. I had an old archive mapping for my monthly archives template that used MT tags to give yyyy/mm/index.html, because in 3.16 there was no inbuilt option for it. Now there is, so I switched to it, and it works.

Added by Rory on 14 September 2009.

Another thing I had to attend to was changing the MT tags EntryIfAllowComments and EntryIfCommentsOpen to IfCommentsActive and IfCommentsAccepted respectively, so that the entries with closed comments displayed properly. Still hasn’t fixed the issue of new comments not triggering a rebuild, though.

Added by Rory on 14 September 2009.

Aha, solved the last piece of the puzzle. I had to remove LaunchBackgroundTasks from the config file. Comments now trigger a rebuild, and they’re getting sent properly in notification emails.

http://wiki.movabletype.org/LaunchBackgroundTasks

Added by Rory on 14 September 2009.