Tags not importing when using WordPress import system

by omega33   Last Updated September 08, 2017 06:08 AM

I am attempting to move all content from an existing WP installation, to a fresh installation.

I export all content, using the Tools > Export feature.

When I attempt to import into the new installation, I get the error Failed to import post tag.

It would seem none of the tags can be imported. I have no idea why, and haven't managed to find info about this online.

Here is a sample of the tag entries in the XML file:

<wp:tag>
    <wp:term_id>31</wp:term_id>
    <wp:tag_slug><![CDATA[accounts]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Accounts]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>148</wp:term_id>
    <wp:tag_slug><![CDATA[acl]]></wp:tag_slug>
    <wp:tag_name><![CDATA[ACL]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>191</wp:term_id>
    <wp:tag_slug><![CDATA[ad-blocking]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Ad-blocking]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>212</wp:term_id>
    <wp:tag_slug><![CDATA[adblock]]></wp:tag_slug>
    <wp:tag_name><![CDATA[adblock]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>231</wp:term_id>
    <wp:tag_slug><![CDATA[address-book]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Address Book]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>28</wp:term_id>
    <wp:tag_slug><![CDATA[adobe]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Adobe]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>213</wp:term_id>
    <wp:tag_slug><![CDATA[advertising]]></wp:tag_slug>
    <wp:tag_name><![CDATA[advertising]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>98</wp:term_id>
    <wp:tag_slug><![CDATA[alternative-apps]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Alternative Apps]]></wp:tag_name>
</wp:tag>
<wp:tag>
    <wp:term_id>141</wp:term_id>
    <wp:tag_slug><![CDATA[android]]></wp:tag_slug>
    <wp:tag_name><![CDATA[Android]]></wp:tag_name>
</wp:tag>

It all looks find to me.

Does anyone have any suggestions?

Thanks.

UPDATE I discovered the tags had in fact imported (well, just two unused tags were missing on the receiving site... perhaps because they were unused the export/import ignored them?). Otherwise, all tags and categories imported, despite the error message suggesting the tags failed.

I also discovered all featured images were missing (no reference to them in the Posts table, or incorrect references — I forget which, but think it was the prior).

Tags : migration import


Answers 1


Save the xml snippet to a xml file. And after seeing the message Failed to import post tag (after importing all the posts) import this file. It will import all the tags.

Here is your xml-

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/">
    <channel>
        <wp:wxr_version>1.2</wp:wxr_version>

        <wp:tag>
            <wp:term_id>31</wp:term_id>
            <wp:tag_slug><![CDATA[accounts]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Accounts]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>148</wp:term_id>
            <wp:tag_slug><![CDATA[acl]]></wp:tag_slug>
            <wp:tag_name><![CDATA[ACL]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>191</wp:term_id>
            <wp:tag_slug><![CDATA[ad-blocking]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Ad-blocking]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>212</wp:term_id>
            <wp:tag_slug><![CDATA[adblock]]></wp:tag_slug>
            <wp:tag_name><![CDATA[adblock]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>231</wp:term_id>
            <wp:tag_slug><![CDATA[address-book]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Address Book]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>28</wp:term_id>
            <wp:tag_slug><![CDATA[adobe]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Adobe]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>213</wp:term_id>
            <wp:tag_slug><![CDATA[advertising]]></wp:tag_slug>
            <wp:tag_name><![CDATA[advertising]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>98</wp:term_id>
            <wp:tag_slug><![CDATA[alternative-apps]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Alternative Apps]]></wp:tag_name>
        </wp:tag>
        <wp:tag>
            <wp:term_id>141</wp:term_id>
            <wp:tag_slug><![CDATA[android]]></wp:tag_slug>
            <wp:tag_name><![CDATA[Android]]></wp:tag_name>
        </wp:tag>
    </channel>
</rss>

Hope this one solves your problem.

the_dramatist
the_dramatist
August 20, 2016 05:03 AM

Related Questions


How to do one-off import or data migration?

Updated May 29, 2015 22:03 PM



Import whole site to wordpress

Updated July 27, 2016 08:03 AM