I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for "news" posts and the other is for "blog" posts (I know this was not the best way of setting things up).

In my new blog, I have created two custom post types ("news" and "blog") and I would like to import these two older installs into my new install's respective post types.

Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.

Thank you! Jake

3 Answers 3


Try importing and then using a plugin (Post Type Switcher) to change the type. There are a few other plugins out there for this, I seem to remember one which would convert multiple posts, but I couldn't find it just now.

  • Thank you, sir, so much. Just what I needed. Much appreciated!
    – Redlist
    Commented Mar 24, 2011 at 15:42

As an alternative, when you use the Wordpress Export tool, you can open the XML file that is exported in any text editor (I used Notepad++).

I did a simple find a replace on this line:


and replaced with:


This took all my old "posts" and made them into my new custom content type "blog".

Then I just imported into the new site, that already had a custom post type called "blog" and it worked flawlessly.

  • 1
    This is the best answer IMO. Very easy, works great. Commented May 18, 2015 at 15:37
  • 1
    This also works for changing the taxonomy/category terms as well. Look for <category domain="post_tags"> and change the "post_tags" part to your custom taxonomy.
    – KoldBane
    Commented Oct 17, 2017 at 14:52
  • @gamerzfuse Glad this is working fine. But I am facing issue when searching for the <wp:post_type>post</wp:post_type>. Please let me know how to import posts which is assign to specific category (ex:animals) into newly created post type (pets). Commented Apr 25, 2018 at 7:07

Update to @gamerzfuse's answers,

After opening XML in editor, replace below lines/keywords.

Find the below line


and replac with:


To add category, find


and replace with


To add tags, find


and replace with


This will also import Categories and Tags associated with the post into Custom Post Type.

  • is it possible. we can use same slug for custom post type like category and tag. or we need to create different slugs cpt-name-cat and cpt-name-tag? Commented Aug 30, 2022 at 10:07
  • @WaheedurRehman Yes it is possible. Commented Dec 20, 2022 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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