Migrating from Ghost to WordPress Step by Step

Ghost is a great blogging platform for those who enjoy its zen like process. If you want a bit more control like seo and social media shareability optimization plugins, then you may want to move to another platform till Ghost has those functionalities. As this blog grew I found my demands exceeded the abilities of Ghost, and I decided to move to WordPress. After setting up my WordPress site (check here) I came across the problem of migrating my posts from Ghost to WordPress. Ghost gives you a json file and WordPress takes an xml file. I couldn’t find any Ghost or json importer so I had to get creative.

Overview of the plan

  1. If you want to import your posts as markdown install WP-Markdown
  2. Export from Ghost and get the JSON file
  3. Use the Ghost JSON export file to WordPress XML Import File converter to convert the JSON file into an XML file WordPress can understand
  4. Install and use the Wordpres Importer to import the new XML file

Step – 0 If you want to import your posts as markdown install WP-Markdown

One of the things I loved about Ghost was markdown, and I intend to keep using it in WordPress. In order to use markdown in WP you have to install a plugin. I loved WP-Markdown because it did away with the default editor and turns all posts into markdown. Because it turns the default format of the posts into markdown it makes importing markdown very easy.

Step – 1 Export from Ghost and get the JSON file

  1. Log into the admin dashboard.
  2. point your browser to yourdomain.com/ghost/debug.
  3. Export the file and save it to your computer.
  4. Open the file in your favourite text editor.
  5. Highlight the whole document and copy it.

Step – 2 Use the Ghost JSON export file to WordPress XML Import File converter to convert the JSON file into an XML file WordPress can understand

Go to the converter and follow the instructions there.

Step – 3 Install and use the WordPress Importer to import the new XML file

  1. Log into your WordPress admin dashboard
  2. Go to Tools -> Import
  3. Click on WordPress
  4. If it is not installed then install it
  5. Click on browse and choose the xml file that you made in step-2
  6. Click on upload file and import

Ahmed Amayem has written 90 articles

A Web Application Developer Entrepreneur.

  • macleodsawyer

    Is there a way to make this keep the urls the same when imported?

    • http://ahmed.amayem.com ahmedamayem

      Yes, this keeps the urls the same. I have kept all the same URLs when I used it myself.

  • AlexJerez

    Thanks so much for this. This article was a huge time-saver.

    I encountered a problem with my import, but I was able to fix it, so I’ll share it here in case someone else has the same problem:

    When I imported my xml file, I was getting “Failed to import “”: Invalid post type”

    I enabled WordPress Importer’s Debug ( Plugins -> Editor -> WordPress Importer , then change line that says define( ‘IMPORT_DEBUG’, false ); so that it says ‘true;’)

    After enabling the debugger, I got “‘xmlParseEntityRef: no name'” after attempting to import.

    Turns out that the importer doesn’t like my ampersands. So I opened the xml file, did a “Find & Replace” and replaced all instances of ‘&’ with ‘&’ (no quotes), tried importing and… success!

    • http://ahmed.amayem.com ahmedamayem

      Great to hear, and a greadt addition.

      I actually had to turn on the Importer debugger as well when debugging the converter, but I didn’t have ampersands so didn’t have that prob. Great catch.

      Thanks

    • AlexJerez

      Edit: ‘&’ gets replaced with ‘& amp;’ (without the space, and with the semicolon)

  • Nataliya Bogdanets

    For all my migration affairs I turn to this converter http://goo.gl/mvZUno to get the job done without intensive hands-on. Not sure whether they support Ghost CMS migration, but you may check it out.

    • http://ahmed.amayem.com ahmedamayem

      Oh yah, I checked around a lot before making this, but couldn’t find anything, so I had to make it myself.

    • http://infernalsoft.company Syed Shariefi

      I went to the converter site but it seems that they don’t support ghost :(

  • Pingback: Starting Over… | the bytes()

  • Pingback: 从Ghost迁移到WordPress – yearliny()

  • Pingback: Migration from Ghost to WordPress – hiogawa's wordpress()

  • Deola Done

    Hi, how can I get it to export my images too

    • Deola Done

      I found a way around it by manually uploading the images I downloaded from ghost

      • Garth

        Could you explain how you did that? I’m having the same problem…I imported the XML file but my images didn’t get imported.

  • Pingback: Post 4 – Migration – Hack-e-Sta()

  • http://sheldonhull.com/ Sheldon Hull

    Thanks for this! Any success lately from someone on this. I want able to succeed with invalid import format, despite trying to tweak from the previous comments

    • Jen Scovern

      I couldn’t get this to work either. It was saying that my file wasn’t a valid wxr file. Did you ever figure it out?

  • Garth

    Hi, thanks for the tutorial! This is excellent! One problem I encountered, though: there are no images for any of the blog posts. Is there a way to import the images as well?

  • Pingback: GhostからWordPressへ。引越しプランを練る。()

  • Pingback: GhostからWordPressへ (1) 〜引越しプランを練る〜()

  • https://kodius.io Kresimir Bojcic

    Great writeup. Thanks!

  • RedJess

    This article was great, thank you so much!
    Just one note, now that Ghost have updated their dashboard you’ll need to point your browser to myaccount.com/ghost/settings/labs/