
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYes, 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 basic steps they followed were:
sanity dataset import to bring everything inThe 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.
You'll want to write a Node.js script that:
@sanity/block-toolsThe 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.
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.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store