最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

migration - Tags not importing when using WordPress import system

programmeradmin2浏览0评论

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).

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).

Share Improve this question edited Aug 25, 2016 at 17:40 omega33 asked Aug 20, 2016 at 2:40 omega33omega33 3646 silver badges20 bronze badges 2
  • When I looked through the receiving database in more detail, it appeared all that was missing was the featured image data. Rather than messing around with the XML any further, simply exported the tables for posts, postmeta, and comments (I had to do all three because replacing Posts meant the Post IDs no longer matched with the other two tables. This seems to have resolved the issue, and completed the migration. Oddly, even through the error I got (consistently) during the XML import referred to the Tags, as far as I could tell, all tag data migrated without a hitch. – omega33 Commented Aug 24, 2016 at 16:18
  • I've never had the WordPress importer actually work with media. Everything else it does a fine job of but it feels like the import media option is just a checkbox that never got built out in the backend. – mrben522 Commented Dec 20, 2018 at 21:10
Add a comment  | 

1 Answer 1

Reset to default 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/export/1.2/excerpt/" xmlns:content="http://purl/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb/CommentAPI/" xmlns:dc="http://purl/dc/elements/1.1/" xmlns:wp="http://wordpress/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.

发布评论

评论列表(0)

  1. 暂无评论