Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have two Wordpress installations that I would like to make into one installation, but still keep the posts (and their meta-data) separated. Both installations currently share the same database.

I would like to be able to loop through both blogs, but each on their own page.

I have extracted both databases using the built in export function in WordPress and am now sitting with two .xml files containing the posts from each database.

Now I would like to import these posts into a new clean WordPress installation, BUT how can I keep the separated? I don't want them to get mixed up, because then I can't show them on their own page.. I am thinking about using a custom loop using WP_Query.

Thanks, I hope you understand what it is I want.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

When you choose to import them into the new/merged website, you'll have the option to import the author, or to assign a new one to the imported posts. You could assign different authors to each import and use that to separate the content.

Do both use the same categories? If they don't it should be simple since they will retain the categories when imported.

share|improve this answer
    
Hi, thank you for answering. I didn't think about separating the posts via categories (which they already are, with a few exceptions.) But how can this method be future proofed? If I add a new category I have to make sure it is only shown in either blog A or blog B. I've been experimenting a little with custom posts. I have made two new post types and then imported one of the blogs. Now I plan to somehow convert these "regular" posts to "custom" posts. And the repeat for the second blog. This way categories wont be a problem, because I can just loop through every custom post of type A or B. –  Simon Apr 14 '12 at 18:18
1  
If you decide to go with the custom_post_type you might want to try this plug-in, or at least take a look at the code to see how to do your own: wordpress.org/extend/plugins/convert-post-types –  Jeremy Jared Apr 14 '12 at 20:11
    
:O Thanks a bunch :D –  Simon Apr 14 '12 at 20:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.