I decided to make the move from Wordpress to MovableType some time ago after I saw the features that MT4 was introducing.
While moving a few entries (less than 200) may not be that daunting of a task, when you go to move a site with close to two thousand (or more) it's a completely different matter.
Apart from the functionality aspects that may or may not be available via plugins and core functions, the key issue is preserving your URL structure as closely as possible. There are a lot of reasons why this makes sense. A quick glance at my server logs show me that most of the traffic to my personal blog is to older articles that are still popular years after I wrote them. I cannot control who has linked to them!
While it may be possible to reconstruct a URL mapping using a complex set of mod_rewrite rules this is hardly advisable or particularly attractive.
The URLs of primary interest are those pointing to individual entries.
By default Movable Type 4 includes a number of mappings that you can select in your site's configuration. However there is no reason why you can't construct your own, as the system will happily support a custom mapping. For a list of configuration variables have a look at the documentation on the site.
There are two stages to the migration:
1. Export
2. Import
From within wordpress (wp-admin/) go to manage > export and take a dump of all your entries.
This will also include all comments and most of your categories.
If you have extra content that is being provided by any of the Wordpress plugins this will NOT be included.
In theory the export file is XML, however it's not valid XML in many cases as Wordpress doesn't seem to encode a lot of extended characters correctly and spits them back out in the HTML format again. While a browser may not have issues displaying this form of character the XML based importer provided by MT might choke.
The solution, unfortunately, is to do some post export data massaging ie. force the "XML" to validate as XML.
In my case, as I use linux, I was able to run it through an XML validator called xml-starlet. Whichever validation tool you use the process will be the same. You basically have to replace any "weird" or non-compliant characters with ones that are valid in XML.
Once the file validates as XML it will be ready for import - almost.
First off you need to make a few minor tweaks to the way MT handles the URLs
The default setting is to take the first X characters from your post's basename and use that as the constructor for the permalink. If you've been using Wordpress for some time you can easily have post entries with very long basenames, so you need to increase the number of characters.
To do this login to MT and go Preferences > Blog Settings > Entries and increase the value of "basename length"
The other thing you'll need to sort out is how you are going to actually map the URLs.
By default Wordpress uses hyphens to replace spaces, so your old blog would have contained lots of urls similar to this:
something-is-very-long
In Movable Type you have a lot more flexibility in how you want to display the URLs, but you probably want to preserve the older mappings.
Go to Design > Templates > Archive Templates and click on the "Entry" template.
Towards the bottom of the screen you should see a section called "Archive Mapping". It comes with twelve popular mappings already configured ie. how you convert an entry into a URL.
So, for example, you might want to display the entry as:
category/sub_category/entry_basename.html
Which would give you something like:
/coolblogs/movabletype/i_like_cake.html
Of course this is movable type, so you can also choose to do up your own mapping. In my case I had to get something that would do this kind of thing for me:
/blog/archives/2007/08/29/irish-mac-users-cant-have-fun/
The blog's root is in /blog , but I wanted all archived entries built out into a sub-directory. Why? Because I set it up that way a long time ago and moving the URLs would be painful!
So the next two bits are the year, then the month, then the day, then the post entry with a trailing slash - so I end up with an index page for each one.
So tweak you mappings to suit your orginal Wordpress mappings. If one of the default sets isn't suitable you can contruct your own using the tags / options available at:
http://www.movabletype.org/documentation/appendices/archive-file-path-specifiers.html
You can now proceed to the import.
Go to System Overview > Tools > Import
The "blog to import" is the blog where you are going to be sending the data ie. your blog's new home. If you haven't got that setup already you will need to do so before proceeding.
"Importing from" - self-explanatory options
You can also choose who the articles / posts are imported as. In my case I'm quite happy to import them all as me, as I don't have multiple authors.
You can also specify where the uploads are set to, however from my own testing this doesn't make much of a difference. Your best bet is to create a directory structure including wp-content/uploads/ as you would have had previously and move all the subdirectories and files from your old wordpress blog into it. This will ensure that all the paths etc., for images in posts and the handling of "assets" in MovableType is handled correctly.
You can now start the import.
For smaller blogs the import file will simply upload using the form and start working, but with a larger import ie. several megabytes of XML code the upload can take some time. (On a sidenote I would hope that future versions of MT allow for other upload options as uploading large files over HTTTP is anything but ideal).
If the upload and import is successful you will get a nice "all done" type message when it's finished.
You may need to do some rejigging of formatting etc., in your posts, as there is a difference in how the two backends handle the user text input, but if it all looks relatively "sane" then you *should*, in theory, be ready to publish.
Of course this covers the migration of the content. I have already touched on some of the functionality in previous posts and will be talking some more in the future.
While moving a few entries (less than 200) may not be that daunting of a task, when you go to move a site with close to two thousand (or more) it's a completely different matter.
Apart from the functionality aspects that may or may not be available via plugins and core functions, the key issue is preserving your URL structure as closely as possible. There are a lot of reasons why this makes sense. A quick glance at my server logs show me that most of the traffic to my personal blog is to older articles that are still popular years after I wrote them. I cannot control who has linked to them!
While it may be possible to reconstruct a URL mapping using a complex set of mod_rewrite rules this is hardly advisable or particularly attractive.
The URLs of primary interest are those pointing to individual entries.
By default Movable Type 4 includes a number of mappings that you can select in your site's configuration. However there is no reason why you can't construct your own, as the system will happily support a custom mapping. For a list of configuration variables have a look at the documentation on the site.
There are two stages to the migration:
1. Export
2. Import
From within wordpress (wp-admin/) go to manage > export and take a dump of all your entries.
This will also include all comments and most of your categories.
If you have extra content that is being provided by any of the Wordpress plugins this will NOT be included.
In theory the export file is XML, however it's not valid XML in many cases as Wordpress doesn't seem to encode a lot of extended characters correctly and spits them back out in the HTML format again. While a browser may not have issues displaying this form of character the XML based importer provided by MT might choke.
The solution, unfortunately, is to do some post export data massaging ie. force the "XML" to validate as XML.
In my case, as I use linux, I was able to run it through an XML validator called xml-starlet. Whichever validation tool you use the process will be the same. You basically have to replace any "weird" or non-compliant characters with ones that are valid in XML.
Once the file validates as XML it will be ready for import - almost.
First off you need to make a few minor tweaks to the way MT handles the URLs
The default setting is to take the first X characters from your post's basename and use that as the constructor for the permalink. If you've been using Wordpress for some time you can easily have post entries with very long basenames, so you need to increase the number of characters.
To do this login to MT and go Preferences > Blog Settings > Entries and increase the value of "basename length"
The other thing you'll need to sort out is how you are going to actually map the URLs.
By default Wordpress uses hyphens to replace spaces, so your old blog would have contained lots of urls similar to this:
something-is-very-long
In Movable Type you have a lot more flexibility in how you want to display the URLs, but you probably want to preserve the older mappings.
Go to Design > Templates > Archive Templates and click on the "Entry" template.
Towards the bottom of the screen you should see a section called "Archive Mapping". It comes with twelve popular mappings already configured ie. how you convert an entry into a URL.
So, for example, you might want to display the entry as:
category/sub_category/entry_basename.html
Which would give you something like:
/coolblogs/movabletype/i_like_cake.html
Of course this is movable type, so you can also choose to do up your own mapping. In my case I had to get something that would do this kind of thing for me:
/blog/archives/2007/08/29/irish-mac-users-cant-have-fun/
The blog's root is in /blog , but I wanted all archived entries built out into a sub-directory. Why? Because I set it up that way a long time ago and moving the URLs would be painful!
So the next two bits are the year, then the month, then the day, then the post entry with a trailing slash - so I end up with an index page for each one.
So tweak you mappings to suit your orginal Wordpress mappings. If one of the default sets isn't suitable you can contruct your own using the tags / options available at:
http://www.movabletype.org/documentation/appendices/archive-file-path-specifiers.html
You can now proceed to the import.
Go to System Overview > Tools > Import
The "blog to import" is the blog where you are going to be sending the data ie. your blog's new home. If you haven't got that setup already you will need to do so before proceeding.
"Importing from" - self-explanatory options
You can also choose who the articles / posts are imported as. In my case I'm quite happy to import them all as me, as I don't have multiple authors.
You can also specify where the uploads are set to, however from my own testing this doesn't make much of a difference. Your best bet is to create a directory structure including wp-content/uploads/ as you would have had previously and move all the subdirectories and files from your old wordpress blog into it. This will ensure that all the paths etc., for images in posts and the handling of "assets" in MovableType is handled correctly.
You can now start the import.
For smaller blogs the import file will simply upload using the form and start working, but with a larger import ie. several megabytes of XML code the upload can take some time. (On a sidenote I would hope that future versions of MT allow for other upload options as uploading large files over HTTTP is anything but ideal).
If the upload and import is successful you will get a nice "all done" type message when it's finished.
You may need to do some rejigging of formatting etc., in your posts, as there is a difference in how the two backends handle the user text input, but if it all looks relatively "sane" then you *should*, in theory, be ready to publish.
Of course this covers the migration of the content. I have already touched on some of the functionality in previous posts and will be talking some more in the future.
Categories
movabletype , wordpress1 TrackBacks
Listed below are links to blogs that reference this entry: Migrating A Largish Site From Wordpress to MovableType 4.
TrackBack URL for this entry: http://www.movabletype4.eu/cgi-bin/mt/mt-tb.cgi/2238
» Migration Howto from Michele Neylon :: Pensieri
I posted a howto on migrating from Wordpress to MovableType 4. Hopefully it will be of use to some people.... Read More


Hi, I came across this as I'm thinking about moving from Wordpress to MT4. I, too, have run into problems importing the exported WXR file into MT4. It seems to be crashing on a comment with a link in it. I'm on Windows, but is there any recommended tools or suggestions to get the WP exported file into something the MT4 importer can work with? I have a lot of posts to import!
It sounds like your export has "extra" or "foreign" characters...
I'd recommend looking at something like "tidy", which is available for Windows as this may help you identify which lines of the export you need to fix. Vim for windows is excellent for doing "find and replace"
HTH
Michele
MTOS 4.1 does a pretty good job of importing WP content, but unfortunately it completely ignores WP "tags". Came across this post looking for a way to import "tags". Any idea?
Matthew
Part of the problem is that WP has several plugins that can create tags, but they're not an integral part of the software and aren't included in the export.
Michele
WP has had native, out of the box, no plugin required, tags since version 2 something. No reason MT's importer shouldn't support that.
Decided probably the easiest route would be to convert my tags back to categories, then do the import. Luckily a pretty simple SQL UPDATE was all I needed to do. WP makes it dead simple to go from categories to tags, but there is no built in way of going back.