# Migrate an HTML blog to Ghost

**URL:** <https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477>\
**Category:** Developer help\
**Created:** [August 18, 2018, 5:39am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477 "2018-08-18T05:39:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudy](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@Rudy](https://forum.ghost.org/u/Rudy)\
**Post date:** [August 18, 2018, 5:39am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/1 "2018-08-18T05:39:40Z")

</div>

Hi!

I have an old blog that I would like to migrate to Ghost. My blog post pages are pure HTML with images. I have two questions.

1. Does Ghost support HTML so that I simply copy-paste my HTML to Ghost?
2. Can I write a script to copy all my posts to Ghost to avoid doing that manually one by one?

Thanks

---

<div class="post-metadata">

**Author:** ![diomed](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diomed/32/1678_2.png) [@diomed](https://forum.ghost.org/u/diomed)\
**Post date:** [August 18, 2018, 7:44am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/2 "2018-08-18T07:44:22Z")

</div>

if you go to Labs and enable Koenig editor you’ll see that when you write a new story, it does indeed support inserting HTML

don’t know about 2nd

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [August 18, 2018, 3:47pm UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/3 "2018-08-18T15:47:21Z")

</div>

1. Yes, ghost supports HTML. With the new editor, you can even take rich content (i.e. content with headings, boldface, italicized, etc.) and paste it in, and the editor will clean it up for you

2. Yes, you can. There are two options for this - creating a custom export and importing that into Ghost, or using the private (undocumented) write API to insert them into an existing Ghost instance

Ghost saves posts in the mobiledoc format, and internally converts that mobiledoc to html. Here’s the template to use:

```json
{"version":"0.3.1","atoms":[],"cards":[["html",{"html":"HTML_GOES_HERE"}]],"markups":[],"sections":[[10,0],[1,"p",[]]]}

```

---

<div class="post-metadata">

**Author:** ![Rudy](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@Rudy](https://forum.ghost.org/u/Rudy)\
**Post date:** [August 19, 2018, 2:57am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/4 "2018-08-19T02:57:58Z")

</div>

If that write API is undocumented, how can I learn to use it?

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [August 19, 2018, 3:20am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/5 "2018-08-19T03:20:33Z")

</div>

The best way to figure out how to use the private API is reading the [private API information section](https://api.ghost.org/docs/getting-started#section-private-api) in the API docs (so you get a better understanding of the core concept), and inspecting network traffic (using your browser’s developer tools) as you go through the actions of creating a test post

---

<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:** [September 2, 2018, 3:20am UTC](https://forum.ghost.org/t/migrate-an-html-blog-to-ghost/2477/6 "2018-09-02T03:20:34Z")

</div>

Closed on September 2, 2018, 3:20am UTC

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