I'm working with a client that wants to migrate from ExpressionEngine to WordPress. I have an EE template that is supposed to (and seems to) generate a WP XML Import file.

However, when I import the file into my new WP installation, only the very last entry is imported. Everything associated with that entry is correct, but it skips the hundreds of posts that precede it.

Here is my EE template code. Is there something that I'm missing?:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->

<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!--    on the site. For each author, you may choose to map to an -->
<!--    existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!--    contained in this file into your site. -->

<!-- generator="WordPress/3.3.2" created="2012-06-25 23:09" -->
<rss version="2.0"


{exp:channel:entries {if segment_3 != ""}channel="{segment_3}"{/if} orderby="date" sort="desc" limit="500" rdf="off" }

        <pubDate>{entry_date format="%r"}</pubDate>
        <guid isPermaLink="false">http://domain.com/?p={entry_id}</guid>



        <category domain="category" nicename="{category_url_title}"><![CDATA[{category_name}]]></category>

        <wp:post_date>{entry_date format="%Y-%m-%d %H:%i:%s"}</wp:post_date>
        <wp:post_date_gmt>{gmt_date format="%Y-%m-%d %H:%i:%s"}</wp:post_date_gmt>
        <wp:status>{if status == "open"}publish{if:elseif status == "review"}pending{if:elseif status == "closed"}private{if:elseif status == "draft"}draft{if:else}publish{/if}</wp:status>
  • And have you looked at your exported file to make sure it actually contains hundreds of correctly formatted XML entries?
    – jrothafer
    Apr 15, 2015 at 14:02
  • I have, and it does.
    – Ty Morton
    Apr 15, 2015 at 20:11
  • suggest you run the output through an RSS validator... validator.w3.org/feed Wonder if more elements need to be wrapped in {exp:xml_encode}
    – AllInOne
    Apr 16, 2015 at 22:37
  • Thank you for sharing your codes on how to migrate EE to WP. However when I checked the xml rendered it seems the description and link blocks is all over the code. I just copy and paste the way you posted the solution here. Can you help me please to figure it out what is my mistake? Regards, Jayson
    – Jayson
    Aug 29, 2018 at 1:59
  • Jayson, you'll be better off posting a new question of your own and outlining specific details about the problem, any errors, and where you're stuck.
    – Alex Kendrick
    Aug 30, 2018 at 16:26

1 Answer 1


I found the answer. The way the XML file was being rendered, there was no line break between the item closing tag, and the next item's opening tag (</item><item>).

This passed all validation tests, but WP wouldn't process it properly. I added the line breaks, and everything worked as expected.

Thanks to everyone for the effort!


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.