Ghost to WordPress: converting the JSON export and keeping tag and author URLs
Ghost and WordPress share more URL conventions than any other pair on this list. A default Ghost post lives at /post-slug/, tag archives at /tag/tag-slug/ and author pages at /author/author-slug/, which are exactly WordPress's defaults with the Post name permalink. So the migration can keep nearly every URL unchanged, and the redirect list stays short.
The work is in the data. Ghost exports content as a single JSON file from Settings → Advanced → Import/Export, WordPress cannot read JSON, and the images are not in the file. You convert the JSON to WordPress XML, copy the images separately, and check that SEO fields made it across.
What the Ghost export contains
The JSON export is more complete than most platforms' exports. Alongside posts, pages, tags and staff users, it carries a posts_meta table with each post's meta_title, meta_description and the Open Graph and X title, description and image fields. Two things are missing:
- Images. Self-hosted Ghost keeps uploads in
content/images/, organized by year and month. Copy that folder off the server. On Ghost(Pro), ask Ghost's support for an image archive. - Members. Export them from the Members screen as a CSV with email, name, labels, newsletter status and, for paid members, a Stripe customer ID. Paid subscriptions are tied to the Stripe account connected to Ghost, so decide how your WordPress membership or newsletter plugin will take them over before you switch anything off.
Your routes.yaml (under Settings → Labs) matters too. If you ever customized routes, for example putting posts under /blog/{slug}/, your live URLs differ from the defaults, and the file tells you how.
Converting JSON to a WordPress import
WordPress's importer reads WXR, WordPress's XML format, so the JSON needs converting first. Two routes are in common use: the free web converter at wpghostimport.com, and ghost-to-wp, an open-source command-line script on GitHub that writes a WP_import.xml file. Both produce a file for Tools → Import → WordPress.
Then handle the pieces converters tend to skip:
- Image paths. Posts reference
/content/images/2024/03/photo.jpg. Copy the folder intowp-content/uploads/and update the paths with a search-replace, or keep the same folder structure and add a server rule that maps/content/images/to the new location. - SEO fields. Open a post that had a custom meta title in Ghost and see whether it arrived. If not, the values are still in
posts_meta, and you can enter them in the SEO Settings sheet for the posts that earn traffic. - Cards. Ghost's bookmark, callout, toggle and gallery cards arrive as HTML. They display, but they will not be editable as blocks until you convert them.
Where Ghost and WordPress URLs line up
| Ghost | WordPress | Action |
|---|---|---|
/post-slug/ | /post-slug/ | Set permalinks to Post name |
/tag/recipes/ | /tag/recipes/ | Import tags as tags, not categories |
/author/sam/ | /author/sam/ | Give the user the same nicename |
/page/2/ | /page/2/ | Nothing |
/rss/ | /feed/ | Redirect |
/post-slug/amp/ | /post-slug/ | Redirect, if AMP was ever on |
The one decision that breaks this alignment is importing Ghost tags as WordPress categories, which moves them to /category/. If you want categories anyway, each /tag/x/ needs a rule to /category/x/. Hydrogen SEO's Redirection Manager takes them as Exact Match 301s; its Starts With match sends a whole group to one fixed target, so it cannot rewrite the slug for you, and a one-line server rewrite is quicker when there are dozens.
Finally, download the redirects.yaml file from Ghost Admin. Each 301: line is a past move, and it has to be recreated on WordPress, pointing at the final URL. Regex rules in that file become server rules; the redirect rule generator helps with long plain lists.
Rankings and the switch
Point the domain at the WordPress host once the staging copy passes a crawl of your Ghost sitemap (/sitemap.xml, with child sitemaps for posts, pages, tags and authors). With the URLs kept identical, Google sees the same addresses serving the same articles in new HTML, and rankings typically hold. Expect short-lived movement if the new theme changes headings, internal links or page speed a lot.
After the switch:
- Crawl the old sitemap list and confirm 200s, with 301s only where you meant them.
- Check that no post still loads images from the old Ghost host.
- Confirm newsletters and paid members work before cancelling Ghost(Pro) or shutting down the server.
- Submit the WordPress sitemap and run the site audit.
Common questions
Can WordPress import a Ghost JSON file directly?
No. WordPress imports its own XML format. Convert the Ghost JSON first with a converter such as wpghostimport.com or the ghost-to-wp script, then run the WordPress Importer.
Will my Ghost URLs change in WordPress?
Not if you use the Post name permalink, import tags as tags and match author slugs. Only custom routes, the RSS feed and any AMP URLs need redirects.
Are Ghost images included in the export?
No. Copy the content/images folder from a self-hosted install, or ask Ghost support for an image archive if you use Ghost(Pro).
Does Ghost's redirects.yaml work on WordPress?
No. The file only affects a site Ghost is serving. Recreate its rules as WordPress redirects or server rules before switching the domain.