Posts Tagged ‘work’

Migrating to MovableType 5

January 8th | No Comments | ,

Very recently, MovableType 5 was released to the public, and it was a huge update in terms of the backend. Mainly, it was no longer solely a blog-engine like WordPress, but also included the ability to create a static website. Before you would need to tweak the templates and fields to create one of these, but there would always be mentions of blog-related tools and sections in the interface that you would need to ignore or re-purpose. Now, you can just create a website, with ‘blogs’ as sub-websites.

In my business, I run a single MT installation for several websites to ease maintenance (one of the few things I prefer about MT over WordPress, the ability to manage several websites or blogs in one installation), and I had tweaked the templates and what not to turn the ‘blogs’ into static websites. The other day I decided to upgrade this installation to MT 5 and then migrate the ‘blogs’ to ‘websites’. This proved to be quite a laborious process and I decided to give up after only the first one. I spent two hours copying and pasting pages and templates across the two, making sure everything was duplicated properly. I was resolved to try and find an easier way of completing the task for the remaining 4 websites, since I was not looking forward to spending another 8-10 hours of copy and paste. When I re-approached the problem earlier today, I finally figured out a few tricks that I thought I’d share with anyone that might want to migrate a large website or multiple websites.

For the templates, I thought I would be able to easily solve my problem by just exporting them into a theme and applying it to the new website, except every time I tried to export them from one of the blogs, it would give me an error. Just to check, I tried exporting the theme for the blog I had already migrated to a website; it worked wonderfully. So I had to give up there, and I resolved myself to copy and paste for the templates.

The pages and assets were a bit easier, I spent a few minutes in phpMyAdmin and changed all of the blog_id fields from the old ‘blog’ to the new ‘website’, this worked pretty well, except for the pages that I accidentally put into the wrong website. For those, I simply copied and pasted into new pages rather than trying to figure out which ones they were in the MySQL database (which probably wouldn’t have been too difficult in hindsight).

All in all, I spent about 4 hours today migrating, publishing, and checking to make sure everything worked right (and aside from a few hiccups, it did). So those are my notes on migrating from MT 4 to MT 5, hopefully I can help someone else avoid hours of pointless copy and paste in lieu of some database trickery, with a little copy and paste on the side.

Stop SOPA