When I first thought about moving my blog to a new host, I thought it would be a piece of cake. Getting the domain moved, server working, and MovableType installed were a cinch because I've dealt with all that before, but I did run into one hurdle that I didn't expect: Redirecting MovableType archives.
The problem existed because, by default, MT archives are built with numeric entry numbers. So, an archive for a post might look something like this:
But, if you move servers and start a new database, there's a pretty good chance that something somewhere is going to get fouled up/renumbered when you import the new entries. (Granted, there's probably more than a few ways to move the existing sql database, but I was somewhat concerned that I would just hose the whole thing, so I imported the old fashioned way).
Assuming that you may have deleted a post or two somewhere along the line (or moved to your own database, perhaps), the archive for that same post on the new host might look like this:
Therefore, anyone visiting from a search engine or bookmark is probably going to see something completely different than they expected to find.
I was pretty stumped on the best way to remedy this problem until I happened on David Ely's website and noticed that he had posted an entry on How to Migrate Archives from MT to Typepad. It was then and there that I realized that this would work very easily for moving movabletype servers as well.
So, following David's advice, here's the steps I took to redirect my MovableType archives:
- Back up my current Individual Entry Archive template.
- Replace the current template with a version of David's template.
- Rebuild the entire site with David template as my Individual Entry Archive template.
- Revert back to your standard Individual Entry Archive template.
- Change the archive style in the MT config page to the following: <$MTEntryDate format="%Y/%m"$>/<$MTEntryTitle dirify="1" trim_to="15"$>.php. (My pages are php, you may need to set your file extension to .html depending on your site configuration.
- Rebuild the entire site again with the normal page template, but the new archive structure.
- Download (ftp) the archives directory and upload to new host.
- Export the posts from the old blog and import them on the new blog.
I'll be the first to say that it took a little trial and error. In the end, it really wasn't that hard. Hope this helps if you're trying to redirect your MT archive pages.