Joint session with Vercel: How to build intelligent storefronts (May 15th)

Migrating from Ghost to Sanity - Tools and Success Stories?

5 repliesLast updated: Nov 29, 2025

Did anyone successfully migrated from Ghost to Sanity? Any tool that might help to do that?
AI Update

Yes, people have successfully migrated from Ghost to Sanity! There's actually an official guide from Mux (the video API company) that walks through their complete migration of 128 blog posts from Ghost to Sanity.

The Migration Process

The basic steps they followed were:

Key Tools and Libraries

The most important tool for Ghost migration is @sanity/block-tools, which provides htmlToBlocks() to convert HTML content into Portable Text. The Mux team's approach shows how to use this with custom rules:

import blockTools from '@sanity/block-tools'

blockTools.htmlToBlocks(html, bodyContentType, {
  parseHtml: html => new JSDOM(html).window.document,
  rules: [
    {
      deserialize(el, next, block) {
        // Custom logic to handle specific HTML elements
        // and convert them to your schema types
      }
    }
  ]
})

This lets you intercept specific HTML elements (like iframes for embeds, pre tags for code blocks, etc.) and transform them into custom Portable Text types.

Migration Script Approach

You'll want to write a Node.js script that:

The Mux guide recommends doing this incrementally - migrate a few posts at a time, check them in Studio, fix any issues, then continue. This is much more manageable than trying to perfect everything in one go.

Additional Resources

Why Sanity for Blog Migration?

If you're considering moving from Ghost, Sanity offers some compelling advantages:

The migration does require some scripting work, but the Mux team found it worthwhile - they ended up with a blog that's part of their main Gatsby site with custom preview panes, SEO tools, and a branded Studio experience.

Show original thread
5 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions