Export, Import

I’m trying to move the blog over to the new host without doing anything fancy involving moving the databases around. Just doing an export and an import in MovableType is likely to break your permalinks, especially if you’ve deleted entries, imported in non-chronological order, or run more than one blog out of the same MT database. This misnumbering problem has been amply moaned over in the MT forums. However, one post suggested a way to keep your entry ID’s the same by hacking both the old and new MT implementations.

That wouldn’t work for me because only this MT on Freeshell is hackable. So what I did was hack CMS.pm as directed, but instead of making a new field called POSTID, I added anchor links to each entry for the old ID. You can export exactly as directed and then query-replace to insert the anchor links, which is more or less what I did.

That still leaves one problem - old entry id’s could conflict with new ones, so that on the same page one anchor linked to the old #209 and one to the new #209. You’d probably get the first one on the page no matter which one you were after.

The solution is simple. I was padding my permalinks (so that #209 came up as #000209), so all my hacked-in anchors are of the #000209 format. By removing the pad=”1″ from my templates, I’ll make my new permalinks look like #209. The link for 000209 will never conflict with 209, since I haven’t yet made it to 100,000 entries.

I do realize that this entry won’t make much sense unless you’ve had the same problem. If you have the problem and still don’t understand, feel free to email me. My address is around here somewhere.

Comments are closed.