« Coldfusion CFSchedule fortnightly recurrence workaround | Main | First Post Using Windows Live Writer »

Upgrading Movable Type from 3.2 to 3.3

software-movabletype.gif
I periodically check to see if movable type has updated their blog software. Today I checked and noticed they had version 3.3. out. Cool, upgrading should be a snap, right? I had to sign in to TypePad to download the latest software. I downloaded the tarball, and uploaded to to my server. Unpacking revealed no readme file. Version 3.2 had a README.txt, though it just pointed you to their website. I like the idea of having the latest installation instructions, but a simple text file with quick and dirty "./configure, make, make test, make install" type of instructions (ahh, the good old days) should still be included.

I poked around on their site and found http://www.sixapart.com/movabletype/docs/Movable_Type_Installation-Upgrade_Guide.pdf. Awfully wordy and geared towards first time install, though there is a section about upgrading. My biggest gripe about open source software for linux is the upgrade process. You always end up running around, copying, moving chmod'ing, logging into your database and executing scripts, etc... I'm afraid Windows has a great thing going with setup.exe. Even a simple perl script with some simple text prompts would be nice. How about just uploading the new tarball, logging into the web admin, and it unpacks itself, makes backups for rollback and so on? I'll give Movable Type credit for the database part, which is done automatically for you via the admin console. This was nice. I could use that when upgrading HORDE applications like IMP (webmail). What a pain upgrades are for horde apps.

Anyway, here are the quick and dirty instructions to get you upgraded on linux/unix in a hurry:

Unpack tarball, backup existing executables
gunzip MT3.3.tar.gz
tar -xvf MT3.3.tar
mv /web/mt /web/mt.save
mv /home/brian/MT3.3 /web/mt
cp mt.save/mt-config.cgi mt/
cd mt
chmod 755 *.cgi

Backup Database
I have to admit, I skipped this step, but I already had a relevant backup. I use mysql so the quickest way is to just tar up your /var/lib/mysql/[blogdbname] folder.

Copy Static files
Ok you are almost done, and the admin may almost appear to work, but you will get some javascript errors and other problems. You need to overlay the contents of mt-static to your actual webroot. It's best to just dump the new mt-static contents over your existing webroot to preserve any plugins or other customizations you may have that are not in the database. Some of the plugin directory names were the same, so I just renamed the originals and moved over the new ones in their place. Once you move all the style sheets, javascript files, images and such, everything should be fine.

Log in to the Blog Admin
Log in to the admin and you will see an Upgrade button. Click it and the database is updated. Rebuild the site files and you are done.

Comments

Thanks for the guide. I don't know Linux at all, but it is so much more convenient to do it this way. A few questions maybe you can answer:

I can't seem to get the "mv" commands to work. Is this because my MT installation is under my cgi-bin directory? It just tells me that it can't see any such file or directory.

Also, I'm guessing there's no "overwrite" equivalent to the FTP upgrade process? For example, when I upload via FTP it overwrites all the appropriate files but still leave my custom search templates, and additional plugins alone. I may be missing something, but using the method outlined here, I would end up with just the default plugins and search templates and would need to copy any additional ones back from my backup, correct?

These commands are all from the shell prompt (command line), and not ftp commands (though there is some overlap in commands). You could just rename the folder to effect a move with ftp.


With these instructions you basically create a fresh install, then layer your customizations back in. The real issue is that some files that are being upgraded may have key pieces part of the upgrade, so it's best to get the upgrade done cleanly, then verify it works before you restore your customizations. This way if things go wrong, it is easier to resolve the cause.

Upgrading MT is more work than it should be, frankly. I have moved my other blog to wordpress and am totally thrilled with it. Upgrades are much easier and the admin interface is 10X better.

Thanks a lot. I was using the shell prompt, but couldn't get those mv commands to work. Ah well, no big deal.

I also have one blog on Wordpress and one on MT. For a while I seitched both to WP, but there were a few things that led to me to put my main blog back on MT, but I can't remember exactly what now. I know one of them was that I use "multiblog" to display a single post from second blog on my page and I couldn't find a way to do that with WP.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)