Sign in
Log inSign up
WordPress to Ghost online

WordPress to Ghost online

Balaji Kandasamy's photo
Balaji Kandasamy
·Apr 26, 2016

Idea

Export the WordPress blog and host my own blog. I decided to go with the popular Ghost platform based on NodeJS. WordPress exports the blog as old school XML. In Other hand Ghost accepts JSON with its own schema. There are plugins out there that would do this in WordPress but that comes only in premium hosting as plugins which I really don't have.

Plan

Usual Google search ended me here WP2Ghost thats based out NodeJS pretty straight forward one line code to export

 $ cd wp2ghost
 $ npm install
 $ node bin/wp2ghost.js <your-wordpress-xml> > ghost.json

Export

Initially thought its easy way out of WordPress. Finally realized executing this piece of code required me to go through the following

  • NodeJS
  • Python
  • Visual Studio 2016
  • C++ Libraries for Visual Studio
  • Windows SDK

After all this finally it worked. Luckily with a high speed internet I was able accomplish the mission in half a day. Later realized we have to manually download all the images from WordPress and replace the url's in the posts json.

Spark

Idea sparked why not host a simple site based out of express, that will take json file as input and do a direct export. As a feature give an option to update the image url's automatically in the blog posts.

I am working on the site now.