How To: Export many entries from MovableType

In the process of moving from MovableType to WordPress, I found that MovableType will not export large numbers of entries. My blog was so big, that MT’s default Export Entries feature would time out, copying less than half of my blog.

In order to export all of the entries from my large blog, I had to create the following custom Export Entries template.

How To: Export large numbers of entries from MovableType

I created a custom export entries template, which would download 250 complete entries (comments and all) with these steps:

  1. Create a new Index Tempalte called “Custom Export” and gave it the name “1.txt” in the Template Name field. (Since I would be doing the export several times, I found it easier to name the export files sequentially – 1.txt, 2.txt, 3.txt, and so on.)
  2. I used the following code to pull just the last 250 entries:

    <MTEntries lastn="250">

    AUTHOR: <$MTEntryAuthor strip_linefeeds="1"$>

    TITLE: <$MTEntryTitle strip_linefeeds="1"$>

    STATUS: <$MTEntryStatus strip_linefeeds="1"$>

    ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>

    CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>

    ALLOW PINGS: <$MTEntryFlag flag="allow_pings"$>

    <MTIfNonEmpty tag="MTEntryCategory">PRIMARY CATEGORY: <$MTEntryCategory$>

    </MTIfNonEmpty><MTEntryCategories>

    CATEGORY: <$MTCategoryLabel$>

    </MTEntryCategories>

    DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>

    —–

    BODY:

    <$MTEntryBody convert_breaks="0"$>

    —–

    EXTENDED BODY:

    <$MTEntryMore convert_breaks="0"$>

    —–

    EXCERPT:

    <$MTEntryExcerpt no_generate="1" convert_breaks="0"$>

    —–

    KEYWORDS:

    <$MTEntryKeywords$>

    —–

    <MTComments>

    COMMENT:

    AUTHOR: <$MTCommentAuthor strip_linefeeds="1"$>

    EMAIL: <$MTCommentEmail strip_linefeeds="1"$>

    IP: <$MTCommentIP strip_linefeeds="1"$>

    URL: <$MTCommentURL strip_linefeeds="1"$>

    DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>

    <$MTCommentBody convert_breaks="0"$>

    —–

    </MTComments>

    <MTPings>

    PING:

    TITLE: <$MTPingTitle strip_linefeeds="1"$>

    URL: <$MTPingURL strip_linefeeds="1"$>

    IP: <$MTPingIP strip_linefeeds="1"$>

    BLOG NAME: <$MTPingBlogName strip_linefeeds="1"$>

    DATE: <$MTPingDate format="%m/%d/%Y %I:%M:%S %p"$>

    <$MTPingExcerpt$>

    —–

    </MTPings>

    ——–

    </MTEntries>

  3. Save & rebuild the temaplate file to create the file that has the last 250 entires.
  4. View the page (it will appear as 1.txt).
  5. Save this page (File > Save As > 1.txt) as a plain text file on your desktop, since you’ll need it later.
  6. Go back to the template tag you created in Step 1, and change the Output file name to 2.txt.
  7. Change the first line of the template code:

    <MTEntries lastn="250">

    to

    <MTEntries lastn="250" offset="250">

    (Note: this change will tell MovableType to export 250 more entries, but to skip the 250 that you just exported in the previous steps.)

  8. Repeat Steps 4 and 5 above to save the 2.txt file to your desktop.
  9. From here, we basically repeat 6, 7, and 8 until all of your entries are exported. Each time you repeat, you will increment the Output file name (3.txt, 4.txt, 5.txt and so on) as well as increasing the offset=”x” variable in 250 entry incriments (offset=”500″, offset=”750″, offset=”1000″, and so on) to continue skipping entries you have already exported in previous steps.

And that’s it. I used the exported files to import my blog entries into WordPress. Perfect!!

1 thought on “How To: Export many entries from MovableType”

Comments are closed.