Recipe for Upgrading MT
installation | 10 June 2007 |
After years of doing it donkey-style, I finally figured the easiest and fastest way to upgrade MovableType. I was moving from Version 3.33 to 3.35, so all references are to that. Here’s my very own Martha Stewart style upgrade recipe …
Preparation Time: 5-10 minutes; Cooking time: 5 minutes, or depends on you. Serves as many as you like.
A download of the latest MT version to which you want to upgrade.
A good zipping/compressing utility, one that creates tarballs (.tar) and gzip (.gz) files. You’re going to need a .tar.gz file. I’m sure this works just as well with a .zip file; I’ve just never tried it. I recommend 7-zip — fast, creates much smaller files, does both .tar and .gz, and, of course, free.
The usual utensils — computer, hard disk, mouse, keyboard, live internet connection.
Download the tarball — the .tar.gz file from SixApart.
Unpack it on your local drive (use what you like, I just use 7-zip throughout). It will create a folder called MT-n.nn-ll where n.nn is the version number (like 3.35), and ll is the language code (en for English).
Rename this folder to mt (lower case), if mt is the name of the folder that contains your installation. If you’ve installed mt to the cgi-bin, then rename this folder to cgi-bin. This is important: remember to organize things so that you have a folder called mt and all the other folders and files of the installation below that.
Rename any files you’ve customized or edited in that the newly-renamed mt or cgi-bin folder that you’ve customized or edited. Specifically, these could be any standard files or, more likely, the default search templates. Rename them to anything you like, or they’ll over write your existing files.
Example: if you have a customized version of default.tmpl (the default search template in the
search_templatesfolder), then, in the newly downloaded-unpacked-renamed folder (created as above), you need to rename default.tmpl to something like default-335-tmpl, so that it doesn’t over-write your custom version. Do this for all your customized files.
Zip it up. Pack up the new installation set that you have on your local drive (the one with the renamed folder and files) to create a .tar.gz file. I recommend you use the free utility 7-zip. If you are using 7-zip, see below for instructions on how to make this .tar.gz file.
Upload the newly baked .tar.gz file to a folder immediately above the mt installation on your server. If your mt is installed to
/public_html/mt, then put the .tar.gz into
Unpack on the server. From your CPanel, go to File Manager. Go into your
public_htmldirectory. Click on the uploaded .tar.gz file. In the top right corner, you will see an option for extracting the contents. Click that. Another window opens, showing the extraction from the .tar.gz. If you’ve followed instruction, your new files will go straight into your old mt installation, over-writing any existing files.
That’s it, you’re done! Now just go to your mt login page and the upgrade process begins.
Serve hot with a scoop of relief.
I find this a whole lot simpler than trying to FTP a 10MB installation, which is the size of the extracted mt installation. On an erratic connection, this can take hours. The other alternative, viz., uploading the factory-shipped .tar.gz to your server, extracting it, and then copying over individual files and folders is equally cumbersome.
The beauty of this is that this doesn’t delete any files. So if you’ve got other plugins, etc., already installed, they’ll all remain intact.
The topping. Creating a .tar.gz file with 7-zip
The reason I use 7-zip is that it gives me the option of doing the .tar.gz in one place. There are others that do this too (WinRAR didn’t, last I checked; you had to use it with a separate utility like WinGZ), but this one’s free and fast and creates significantly smaller archives.
It will generate a file called mt.tar.
Now right-click mt.tar and again select 7-zip and add to archive. This time select .gzip as your format option.
It generates the mt.tar.gz file.
Basically, you’ve zipped twice, once to .tar and then to .tar.gz. You’ll notice that the 10mb installation is now down to about 2.3 MB, much easier to deal with.
Hope this helps. Bon apetit!
A copy of this is on the SixApart community forum.