# Can't Import Tags With Custom Ghost Migration

**URL:** <https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718>\
**Category:** Developer help\
**Created:** [February 19, 2019, 1:27am UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718 "2019-02-19T01:27:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zicklag](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/zicklag/32/1910_2.png) [@zicklag](https://forum.ghost.org/u/zicklag)\
**Post date:** [February 19, 2019, 1:27am UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/1 "2019-02-19T01:27:49Z")

</div>

Hello everybody,

I’m trying to migrate an old Drupal 6 ( ~640 posts ) blog site to Ghost 2 and I’ve successfully written a custom exporter than pulls the Blog posts from the site and puts the data in a JSON for the ghost import, but I’m having problems getting the tags to tie to the posts. Everything else is working, I’ve got users, posts, and tags creating properly, but I can’t get Ghost to apply the tags to the posts.

Here is a test export:

> <https://gist.github.com/zicklag/fc961d30d8061e642fa5c5a0e07384cb>

This is an example of JSON in the format that my exporter generates. I have tested importing this into the latest Ghost 2.14.3 in a completely clean install using the official Docker image.

As far as I understand the `post_tags` section should apply tag 2 ( `Tag Gat` ) and tag 3 ( `Bat Tab` ) to post 28 ( `My Post` ), but even though the tags are created, and the post is imported, the post does not have either or the tags applied to it.

Any help is greatly appreciated. If I am misunderstanding something that would be great, I just have to update my exporter. :)

---

<div class="post-metadata">

**Author:** ![David](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/david/32/34_2.png) [@David](https://forum.ghost.org/u/David)\
**Post date:** [February 19, 2019, 1:46am UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/2 "2019-02-19T01:46:59Z")

</div>

Hi,

It looks you are pretty close there but you will need `posts_tags` instead of `post_tags`. 😉

---

<div class="post-metadata">

**Author:** ![zicklag](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/zicklag/32/1910_2.png) [@zicklag](https://forum.ghost.org/u/zicklag)\
**Post date:** [February 19, 2019, 1:55am UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/3 "2019-02-19T01:55:34Z")

</div>

Thank you! I can’t believe that I have spent the last four hours trying to figure that out. 🤦‍♂️ I even had the thought at one point and I must have looked at my own file for reference instead the an actual export on accident.

Thanks again, now I can migrate my site! 🎉

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [February 22, 2019, 11:27am UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/4 "2019-02-22T11:27:22Z")

</div>

Just an FYI here, we’ve updated our migration docs to try to make how to create a custom import easier and clearer: [How to Migrate to Ghost from other platforms](https://docs.ghost.org/api/migration/)

We’ve also started to provide tooling, the first being an HTML → Mobiledoc converter, which might be handy and with plenty more in the works.

---

<div class="post-metadata">

**Author:** ![zicklag](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/zicklag/32/1910_2.png) [@zicklag](https://forum.ghost.org/u/zicklag)\
**Post date:** [February 22, 2019, 5:52pm UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/5 "2019-02-22T17:52:20Z")

</div>

Awesome, that is great! The Mobiledoc section is greatly appreciated. 👍

BTW the site migration went well. Everything is working and the site looks amazing with the Massively theme. 😄

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [March 8, 2019, 6:02pm UTC](https://forum.ghost.org/t/cant-import-tags-with-custom-ghost-migration/5718/6 "2019-03-08T18:02:34Z")

</div>

Closed on March 8, 2019, 6:02pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
