October 27, 2004

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.

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"$>
CATEGORY: <$MTCategoryLabel$>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTEntryBody convert_breaks="0"$>
<$MTEntryMore convert_breaks="0"$>
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
AUTHOR: <$MTCommentAuthor$>
EMAIL: <$MTCommentEmail$>
IP: <$MTCommentIP$>
URL: <$MTCommentURL$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
TITLE: <$MTPingTitle$>
URL: <$MTPingURL$>
IP: <$MTPingIP$>
BLOG NAME: <$MTPingBlogName$>
DATE: <$MTPingDate format="%m/%d/%Y %I:%M:%S %p"$>

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!

Has this tutorial been helpful? Please consider linking to Learning Movable Type at http://learningmovabletype.com/ . Thanks!

Posted by Elise Bauer on October 27, 2004 to General Tips and Tricks
Comments(7) | Email to a friend | Printer-friendly version


If you would like to send a trackback
please use the following URL: http://learningmovabletype.com/cgi-bin/mt32/mt-tb.cgi/378


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, why not just post the entry in one place and use the MTOtherBlog plugin to extract the information for use in other blogs?

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-

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. The MT Support forum thread on which this tutorial was based is: http://www.movabletype.org/support/index.php?s=079539e7997cb96e39ae39f6ac403784&act=ST&f=14&t=39878&hl=
You might want to post a reply to that thread with your question, with more specific details.

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!

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?

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

(Before posting a comment please see the Comments and Trackbacks Policy. Do you need help troubleshooting your weblog? Please post questions and requests for support at the MT Support Forums. Thanks!)

Remember Me?

(you may use HTML tags for style)

Email to a friend

Email this article to:

Your email address:

Message (optional):