Migrating MT 3.x to 4.x and preserving BASENAME
May 5th, 2009I’m a big fan of WordPress but I still use MovableType for some blogs. Recently I had to upgrade an old MT 3.25 to the newest 4.25 and decided to that cleanly. Created a new blog on 4.25 with all the required configurations. Then I’ve tried to export all the entries on 3.25 and imported everything back on 4.25. Everything went well except for the minor glitch of MT 3.25 doesn’t export the BASENAME information for each entry (that’s useful if you want to preserve the old links). So, here’s what I did. On your old MT 3.25 edit your lib/MT/ImportExport.pm and just add the BASENAME for the template text on the export sub, just before the DATE:
BASENAME: < $MTEntryBasename$> DATE: < $MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
Now, you’ll export a .txt wit all the entries, including the basename. MT 4.x will import this. All you have to do is press the Publish button.
June 2nd, 2009 at 5:01 am
Works great just make sure to omit the space in your code:
June 2nd, 2009 at 5:02 am
Should be:
BASENAME:
DATE:
June 2nd, 2009 at 5:02 am
Sorry – the code should be without spaces
June 2nd, 2009 at 6:58 pm
Yeah, you’re right. I didn’t omit the spaces. That’s a problem with my CSS for code viewing. I’ll try to fix that.