« Colors - Experimenting With, Using MTSetVar and MTGetVar | Main | Adding a Footer »

Moving an Entry from One Blog to Another

For those of you with multiple MT weblogs, have you ever wanted to move an entry from one blog to another? or the entries from only one category from one to another weblog? You can copy the entries from the first weblog and paste them into the second, but how to move the associated comments or trackbacks?

Here's one fairly straightforward method. Note that the categories and subcategories will not transfer over using this method due to limitations of MT.

1. Create a new index template in the weblog that contains the entries you wish to move. Give the template name any name you wish. Call the output file mt.txt. Copy and paste the following code into the new index template:

<MTEntries lastn="1000" sort_order="ascend" category="Your Category Name Goes Here">

AUTHOR: <$MTEntryAuthor$>
TITLE: <$MTEntryTitle$>
STATUS: <$MTEntryStatus$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
ALLOW PINGS: <$MTEntryFlag flag="allow_pings"$>
PRIMARY CATEGORY: <$MTEntryCategory$>
<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$>
EMAIL: <$MTCommentEmail$>
IP: <$MTCommentIP$>
URL: <$MTCommentURL$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
-----
</MTComments>
<MTPings>
PING:
TITLE: <$MTPingTitle$>
URL: <$MTPingURL$>
IP: <$MTPingIP$>
BLOG NAME: <$MTPingBlogName$>
DATE: <$MTPingDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTPingExcerpt$>
-----
</MTPings>
--------
</MTEntries>

Change the "Your Category Goes Here" in the first line to the name of the category whose entries you want to move. If you only want to move one entry, create a new category just for that entry and make it the primary category for that entry. If you want to move entries from multiple categories, separate the categories with "OR" like so: category="Category1 OR Category2 OR Category3".

Save and rebuild the template.

2. Using an FTP program, retrieve the mt.txt file you just created from your weblog directory on your server. (You might want to check it in a text editor, to make sure that the data is there.) In the same directory where the mt.cgi file resides, create a new directory called, "import" and place the mt.text file you just created inside.

3. Open up the weblog edit window for the target weblog into which you want the entries moved. At this point it is a good idea to review the importing instructions in the MT Manual. When you are ready, click on the "Import/Export" button on the left side of the edit screen. Then click the "Import Entries" button. When the import is complete, click REBUILD. View your site. Note that unless you set the Default Post Status to "Publish" in your weblog config, all your imported entries will come in as drafts.

4. Remove the mt.txt file from the import folder you created on your server so that if you run the import process again at a later date, the entries you just imported will not be re-imported.

5. Assuming that all has worked and the entries are now in the target weblog, you can delete the entries from the source weblog. In addition to deleting the entries from the weblog edit window, you may also want to delete the files from your server using an FTP program. I tend to keep the files on my server because others may be linking to them and I don't want to create broken links. However, in this case, I close all of the comments and trackbacks of the entries and save the entries before deleting them in the weblog edit window.

Many thanks to Donna of Live in the Delirious Cool for this tip!

Comments (7)

Dida:

This is great, but what I'm really needing is a way to cross post the same entry to mutiple blogs without recreating dupe entries in the different blogs. Is this possible? Plug-in?
TIA and Cheers-
Dida

Dida, why not just post the entry in one place and use the MTOtherBlog plugin to extract the information for use in other blogs?

Dida:

Hi - I just last night checked out that plugin-there is SO much to learn about MT and how to effectively use it.

In any case I wanted to mention that I've just gone thru the procedure here. What is not spelled out is that the entry category must preexist in the target weblog.

So, everything seemed hunky-dory until the very end. Although I recv'd the message that the move worked, the category entries *did not* appear in the target weblog. I tried rebuilding the entire site, as well as logging out and back in. Still no entries. Any ideas on what I may have done wrong?

Cheers and TIA-
Dida

elise [TypeKey Profile Page]:

Hi Dida - hmm. I found that I did not need to create a new category in the target weblog. The entries imported just fine and the category got created as well. I don't know why it might not be working in your case.

Dida:

I am VERY embarrased right now! I created the new index template in the target blog! I just tried again, and worked just fine.

Have a great weekend!
Dida

didak [TypeKey Profile Page]:

HI Elise- Had no idea my trials would exist in perpetuity here . . . whatever it take to help someone else out! ;~>

So, MT3.2 has a Move option next to each category. However, selecting that option gives me no clue as to what to do next (tried in Firefox and IE)! Have you tried this method? The manual doesn't have anything on it, not did I find anything on the support forum.

I'm thinking the method you outline here may still be the best until someone tells me otherwise. Any clues?

elise [TypeKey Profile Page]:

HI Dida - I think that Move option is to move a subcategory to be under a different category, not anything to do with publishing on a different blog. I haven't played around with it, but it seems that that is its purpose.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)