Learning Movable Type: A Safe Way to Upgrade to MT 3.2


Upgrading or installing Movable Type can be rather intimidating. There are few things I have screwed up so badly attempting, even when they say it is super easy, idiot-proof. I always seem to be the idiot who still can't make it work. I have now upgraded two separate MT installs to MT 3.2 and thought I would share my notes with you. Please note that Jay Allen (Product Manager of Movable Type), Chad Everett (of Don't Back Down and Everitz Consulting), and Arvind Satyanarayan (Movalog) have all helped me at various stages in upgrading, and if I didn't have friends who knew what they were doing, honestly I just wouldn't attempt this on my own. But that's me, and I have over 20 blogs running on one install, so there is a lot that can go wrong.

Six Apart encourages us to write-over our existing MT files with the new software files. You might want to take a look at their Installation and Upgrade instructions. You might also want to see the instructions on the beta blog. They even have a Flash Video of the upgrade process.

I first attempted an upgrade on an install that only had 3 blogs, and was not public. I followed the given instructions but unfortunately I had the cgi path wrong in the config file which screwed up the install process. Once that was sorted out, the install worked perfectly, just as promised.

But what about the live site with over 20 blogs running on it? That one I was not about to leave to chance. Several people on Six Apart's ProNet have discussed how they create a separate directory for an upgrade install of MT, just to be on the safe side. Chad Everett discussed this option in detail with me and it is the method I used for my live site. Here are the steps. Note that as with most things MT, I don't know why or how what I'm doing works, I'm simply reporting on what worked for me. If you have questions regarding your install I encourage you to post them at the MT Support forums.

  1. Do not attempt to do an upgrade late at night when you are about to go to sleep and no one on earth is awake who can help you if you screw up.
  2. Back up your database. I'm assuming that you are by now using MySQL. If not, upgrade first to MySQL before attempting the system upgrade. Then back up that database. (See Backing Up Your Blog).
  3. Create a new directory on your server for the MT3.2 program files. If your existing MT files are in a directory called "mt", label this new directory something like "mt32", so you can tell the difference.
  4. Download the full version (or upgrade version, they're the same now) of MT3.2 from Six Apart.
  5. Upload the files to the new directory. If your new directory is in the cgi-bin, make sure you upload the mt-static directory outside of the cgi-bin, to somewhere in your public_html directory. Upload the images in the mt-static directory as binary files. Upload all other files as text.
  6. Copy all your plugins to the new plugin directory in the new MT directory. Many plugins also have files outside of the plugin directory (Brad Choate's for example). These can usually be found in the extlib directory. Plugin files can also sometimes be found in the php directory. Copy these from your old MT directory to the new MT directory in the same place - if they are in the extlib directory, copy them to the new extlib directory. Note: do not copy over plugins that exist in the new MT distribution, for example, the no follow plugin.
  7. If you have made custom search templates, copy those over to the new search template directory.
  8. Compare your old mt.cfg settings to the new settings in mt-config.cgi-original. Using a text editor, like BBEdit, copy the relevant settings over to the new config file. Notice that the DB password used to be in a separate file. That is no longer the case in MT 3.2. Put your DB password in the new mt-config.cgi-original where indicated. Note that you should have a new cgi path on the config file, as you have put your MT files in a new directory. Also note the default encoding on the new config file (UTF-8). Make sure that it is consistent with the encoding you are already using. If you have changed the names of your comment and trackback cgi files, reflect that in your config file and make sure the new comment and trackback files have the changed names.
  9. Change the name of mt-config.cgi-original to mt-config.cgi. Set permissions of the cgi files to 755, and the mt-config.cgi to 644.
  10. Point your web browser to the location of the new mt.cgi file. The program should automatically recognize that you are doing an upgrade and it should prompt you to upgrade. If this doesn't happen, make sure you have done all the previous steps. You might also want to clear your browser cache before pointing to the new mt.cgi file. According to Arvind in the support forums, "people have experienced a "hanging" when running the upgrade process which is caused by cached javascript files."
  11. Rebuild all of your blogs. If you have several on one install, I recommend Arvind's PowerRebuild plugin. It works. If you use dynamic publishing, make absolutely sure that you rebuild the mtview.php (Dynamic Site Bootstrapper) or it will be pointing to the wrong place.
  12. Once everything is working, remove permissions from your old CGI scripts. After you have completed your upgrade change the permissions of the current mt-upgrade.cgi to 644.

Note that MT-Blacklist does not work with MT3.2. You can disable it, or remove it all together. Not to worry though, SpamLookup appears to be doing a fine job blocking spam.

If you would like professional assistance with your Movable Type upgrade or installation, please contact Chad Everett of Everitz Consulting at chad{at}everitz.com for a price quote.


Posted by Elise Bauer on July 11, 2005 12:35 PM to Learning Movable Type http://www.learningmovabletype.com/