« Life on Saturn's moon Enceladus | Main | Frozen Dead Guy Days in Nederland »

March 9, 2006

Upgrading to Movable Type 3.2

OK. I've postponed this for long enough. I'm upgrading from Movable Type 3.17 to 3.2. Reasons are that I want to start installing some plugins, start displaying my categories, stop people from hotlinking to my images, and then switch from IIS to Apache. So, without further ado...

(Detailed directions continue in Extended Entry.)

Go to http://www.sixapart.com/movabletype, sign in, and download the free 3.2 upgrade. Downloads a file named MT-3.2-en_US.zip. Extracted to C:\Movable_Type_3.2 folder.

Next, I checked the Upgrading Movable Type instructions.

Back Up The Web Site

Looks like they want me to back up my Movable type application libraries at this point. So, I created d:\_backup2 and drug my entire Inetpub folder into it. So, basically, I'm backing up my entire web site. Data and all. (Better safe than sorry.)

My web site was running the whole time as I did the backups, and I didn't have any problems, but it did give me an error on this one file named cicl0001.000 with 10 seconds left to copy. So, I figure it was done. Or done enough. I'm not going to sweat this file. I have no clue what it does. Don't care either. Moving on.

Back up the Database

Now, I will back up my MySQL database. I don't see this as a step in the directions, but I need to back it up anyway. So, now, I'm checking my notes from when I upgraded Movable Type from 3.15 to 3.17.

In Windows, I created the following folder:


Then, at the DOS command prompt, I typed:

mysqldump -u root –ppassword pw > d:\_backup2\mysql\mysql.sql

This appears to have worked. It ran pretty fast, but created an 18 meg file which appears to contain valid SQL for dropping and creating tables, etc. I also found all of the text from my web page in one of the tables named mt_entry. So, although all of my .html files are stored in the folders in Windows Explorer, they’re also stored in the database in the mt_entry table. All of the templates are stored in a table named mt_template.

Export the Movable Type entries from within Movable Type

Use Movable Type's Export to back up your entries. (Select IMPORT/EXPORT from the Utilities menu in Movable Type.) Here, it gets kind of sketchy. The general idea is to click on the link that says Export Entries From Peenie Wallie.

Exporting your entries from Movable Type allows you to keep personal backups of your blog entries, for safekeeping. The format of the exported data is suitable for importing back into the system using the import mechanism. So, in addition to exporting your entries for backup purposes, you could also use this to move your content between blogs.

To export your entries, click on the link below ("Export Entries From Peenie Wallie"). To save the exported data to a file, you can hold down the option key on the Macintosh, or the Shift key on a PC, while clicking on the link. Alternatively, you can select all of the data, then copy it into another document.

NOTE: Be careful when exporting data from Internet Explorer. All versions of Internet Explorer have a bug where data marked as plain text can be intrepreted as HTML. The symptom of this bug is that all of your exported data will run together onto one line. If this is the case, use Netscape when exporting data.

So, I tried using Internet Explorer to back them up. For some reason, right-clicking didn't work for me this time with IE. Maybe because the file is too large? So, this time, I did a right click on the link and did a "Save Target As" command to save the file. It made a 2.3 meg file I named D:\_backup2\movable_type_exports\ IE_03_09_06_save_target_as_mt.txt. Then, I used FireFox, clicked on the link, cut and paste the text into my text editor, and saved it as D:\_backup2\movable_type_exports\ FireFox_03_09_06_cut_and_paste_mt.txt.

So, with the two backups, (one from IE and one from FireFox). I ran a compare and, although they look the same to me, the compare says they’re very different. After studying the differences, I see that the IE_03_09_06_save_target_as_mt.txt has some garbage characterslike these(â€?). So, the IE file is clearly whacked. I tried again with IE, tring to hold down the shift the whole time while the file loaded. No dice. It never let me do a File Save As, and when it opened up the data file, the special characters were still there. So, we'll just pray the FireFox export works. Plus, we've backed up the database anyway, so in theory we could still recover without this backup.

Remove outdated plugins

My plugins folder is located at C:\Inetpub\wwwroot\mt\plugins. So, I checked and I have the following plugins installed.


From the Upgrade Instructions:

Nofollow plugin: If you were using the first release of this plugin, you should remove the old version first to avoid having two copies installed that may conflict with one another. This plugin began shipping with versions 3.16 and higher, and is located in the plugins/nofollow/ folder. After you're finished upgrading, view the README.txt file in that folder for more information on activating and using the plugin.

MT Blacklist plugin: MT-Blacklist is not compatible with Movable Type 3.2 without some modifications. More importantly, thanks to the bundled spam protection in v3.2, it is no longer necessary to protect your installation from spammers. You should make sure to remove all plugin files related to MT-Blacklist in order to avoid conflicts with your installation.

SpamLookup plugin: The SpamLookup plugin now ships with Movable Type. If you are a previous user of SpamLookup, you should be aware that your settings will not be preserved. If you are using the wordlists feature in particular, you should copy those to a safe place before upgrading. After upgrading, you should make sure that your Junk threshold is initially set to 0 on your Feedback settings page. You can change it later, but you should start with the default value because it's most likely the correct one.

So, I decided to rename my C:\Inetpub\wwwroot\mt\plugins folder to C:\Inetpub\wwwroot\mt\plugins_old and create a new C:\Inetpub\wwwroot\mt\plugins folder. This essentially blows away my plugins, which seems like the right thing to do.

Starting the Upgrade

Starting the upgrade, now we're getting somewhere, huh? 2 hours killed so far. Now we're rolling.

Once you've logged in, download mt.cfg and mt-db-pass.cgi from your MT directory to your computer so you can refer to them. mt.cfg is the configuration file which lists settings for your installation of Movable Type and mt-db-pass.cgi contains your database password if you're using MySQL or PostegreSQL.

In Movable Type 3.2, both of these files are replaced with a new file called mt-config.cgi. (Note: mt.cfg and mt-db-pass.cgi will work without any changes under 3.2, but it's strongly recommended to switch to mt-config.cgi for future compatibility) This file is distributed as mt-config.cgi-original to ensure that your configuration information isn't overwritten in a future upgrade, so you should first rename it to mt-config.cgi.

So, it seems like the plan is to open up these two existing files and put the information contained in these two existing files named C:\Inetpub\wwwroot\mt\mt.cfg and C:\Inetpub\wwwroot\mt\mt-db-pass.cgi into the new 3.2 file named C:\Inetpub\wwwroot\mt\mt-config.cgi.

For more details on this process, see the Knowledge Base article Convert To Using The New Configuration File. (Note: This particular knowledge base article is pretty much useless.)

OK. So I did this. I opened the file C:\Movable_Type_3.2\MT-3.2-en_US\mt-config.cgi-original and saved it as C:\Movable_Type_3.2\MT-3.2-en_US\mt-config.cgi. Then I updated it to match the data in the two files mentioned above. The only one I really wasn't sure of was this parameter:

DataSource E:\MySQL

It looks like it used to want this for MySQL. Now, it looks like it only needs the DataSource parameter for the BerkeleyDB Configuration. I put it in there anyway. Why not. I'm pretty tired. It's 11:00 p.m. MST. I've been at this for 2.5 hours. I want it to start working. And soon.

Upload the application files

Transfer all the Movable Type files from your computer to the server, right on top of the existing application files.

OK. Now we're getting somewhere. So, I just grabbed all of the files in the newly created Movable_Type_3.15 folder (Control-A and Control-C), then, I went to my current (existing) MT folder and just did a paste (Control-V). Then, it prompts you…are you sure you know what you’re doing? Say YES. And, it will replace all of your existing MT files. Did I just hose myself? Probably. But we have everything backed up, right?

I updated this blog entry and tried to save and got this message:

An error occurred:
The file you uploaded is too large.

Close / Go Back

I could only get the "Go Back" button to work. Couldn't figure it out. Went back to the directions and found...

Finishing the upgrade

After all of your application files are in place, you simply open up your MT admin interface (the URL ending in /mt.cgi) in your web browser. The system may prompt you for permission to execute some database upgrade steps, after which you will be fully upgraded.

So, I went to http://www.peeniewallie.com/mt/mt.cgi, and I got a new screen I hadn't seen before that says:

Time to Upgrade!
A new version of Movable Type has been installed. We'll need to complete a few tasks to update your database.

And there's a "Begin Upgrade" button. I clicked on it and got the same error message:

An error occurred:
The file you uploaded is too large.

Close / Go Back

Sucks. Not sure why. So, I searched for this error message and found this post: Turns out that I had tried to get tricky and increase the maximum file upload size in the mt-config.cgi file. So, I opened it up and commented out the CGIMaxUpload line like so:

# CGIMaxUpload 500000

I saved this file into the correct MT directory. Then, went back to http://www.peeniewallie.com/mt/mt.cgi, and I got the upgrade screeen that says:

Time to Upgrade!
A new version of Movable Type has been installed. We'll need to complete a few tasks to update your database.

Only this time when I clicked on the Begin Upgrade button, we were off to the races.

* Upgrading database from version 3.1.
* Upgrading table for MT::Config
* Upgrading table for MT::Log
* Upgrading table for MT::Log
* Upgrading table for MT::TBPing
* Upgrading table for MT::TBPing
* Upgrading table for MT::Session
* Upgrading table for MT::PluginData
* Upgrading table for MT::Permission
* Upgrading table for MT::IPBanList
* Upgrading table for MT::Entry
* Upgrading table for MT::Entry
* Upgrading table for MT::Trackback
* Upgrading table for MT::Comment
* Upgrading table for MT::Comment
* Upgrading table for MT::Template
* Upgrading table for MT::Author
* Upgrading table for MT::Author
* Upgrading table for MT::Notification
* Upgrading table for MT::Blog
* Upgrading table for MT::Blog
* Upgrading table for MT::TemplateMap
* Assigning junk status for TrackBacks... (100%)
* Assigning visible status for TrackBacks... (100%)
* Assigning junk status for comments...
* Setting blog allow pings status... (100%)
* Updating commenter records... (100%)
* Setting blog basename limits... (100%)
* Updating author API passwords... (100%)
* Updating comment status flags... (100%)
* Setting default blog file extension... (100%)
* Updating blog old archive link status... (100%)
* Updating blog comment email requirements... (100%)
* Setting your permissions to administrator.
* Assigning blog administration permissions... (100%)
* Assigning entry basenames for old entries... (100%)
* Updating entry week numbers... (100%)
* Database has been upgraded to version 3.20010.

When I first checked my site, it still said “Powered by Movable Type 3.17?. Then, once I had saved an entry, it updated to show version 3.2.

Congratulations! You're now running Movable Type 3.2!

Upgrading Templates

A note about template upgrade:

Once you have completed upgrading the system software, you may wish to also upgrade your templates in order to take advantage of the latest capabilities of the system. While Movable Type attempts to maintain backwards compatibility with previous versions, some behavioral changes may result in incorrect display of your published content.

If you'd like to restore any of your templates to the default settings in Movable Type 3.2, you can use the template refresh functionality provided by the "Template Backup and Refresh" plugin.

You can select individual templates to refresh from the weblog's template listing screen. Select the option "Refresh template(s) from the dropdown in the action bar and the selected templates will be updated to the latest.

If you want to refresh all templates in a blog, you can do so via the System Overview weblog listing. Just select the weblog from that listing and the dropdown option "Refresh template(s)" and all existing templates in your blog will be refreshed to the latest.

Activating Plugins

Nofollow plugin: After you're finished upgrading, view the README.txt file in that folder for more information on activating and using the plugin.

SpamLookup plugin: After upgrading, you should make sure that your Junk threshold is initially set to 0 on your Feedback settings page. You can change it later, but you should start with the default value because it's most likely the correct one.

Here's a link to more plugins for Movable Type than you'll ever need.

OK. It's midnight. I burned about 3.5 hours on this project. It's working. I'll deal with my templates and plugins on another day. I'm on 3.2 anyway.

Next Projects: Install Apache Web Server under XP
Stop Image Hotlinking

Posted by Peenie Wallie on March 9, 2006 at 8:23 PM