Wordpress to Ghost Migration Update

Hey all,

I know that https://help.ghost.org/article/21-migrating-from-wordpress-to-ghost is not up to date, but I think that a good Ghost adoption focused tool should make it easy for people to migrate a blog from WordPress to Ghost (so that document needs an update, as well as the WP plugin, I guess - tried it out and it still exports and imports content ok, but is missing some features).

I manually migrated a very small blog from WP to Ghost and I enjoyed the experience, but am considering migrating a bigger one (150+ posts or so). I’ve tried it out on a Ghost test install and it basically works, but it could work much better with some small modifications.

One feature that I think would make sense for this migration is to allow users to choose whether they want to migrate tags to tags or rather categories to tags (usually, content in WP is structured in categories rather than just tags - as default taxonomy). As it is now, you need to recreate old categories as tags and reassign posts to new tags, while maybe removing the old tags (if they make the tag structure too complicated). This could also solve the issue of migrated permalinks being domain.com/category/title/ in both WP & Ghost cases (if also Ghost would have this native option to rewrite tag categories).

Another useful feature would be to export and import pages as well (directly as posts or as posts with the page attribute already set). I’ve looked through my test migration and I don’t remember seeing the pages in there (so those need to be recreated manually). LE: Nevermind this, it’s already there.

And a third useful feature would be for the export script to automatically replace /wp-content/uploads/ to /content/images/ so users don’t have to run a find and replace in the export file (I did this and I had to factor in the escape \ characters for / as well as the tutorial wasn’t mentioning this little hiccup).

Thanks! :slight_smile:

Hey @dsecareanu :wave: Thanks for your feature suggestion, and for bringing up your confusion regarding the find/replace portion of the guide. I’ve made several changes to that particular article (including adding screenshots) to hopefully make the process easier for those coming over from WordPress.

As for your suggestions, I definitely think improvements could be made to the WordPress plugin, so I’m interested to see the discussion that comes of this idea. :slight_smile:


To add to this topic, I ran into other issues while doing the migration and the content cleanup afterwards:

  • had to manually delete all tags and replace them with category representative tags (and there is no select all or multiple tags to run actions on them, such as delete or anything else - luckily I found out that removing them from articles was faster and then I deleted them directly in the database with a query that deleted all tags that didn’t have any article connected to them - something clearly not recommended :smile:, but it works: DELETE FROM tags WHERE id NOT IN (SELECT tag_id FROM posts_tags);)
  • had to manually reassign new tags to every story so I could categorize them (but then this was expected - but a similar option to multiple select stories and run actions onto them, such as assign them to a tag, would probably be useful as well)
  • had to also upload a redirect json file from the old WP /category/ URLs to the new /tag/tagname URL’s
  • other than that, there’s probably a slightly negative perception that the wordpress2ghost plugin is out dated (and you do get such a warning on the WordPress Plugins | WordPress.org page) and I think a minor update (i.e. mark it compatible with latest 4.9.5 wp version) that would bump it latest update date to present time would work wonders on the perception of people thinking about trying out this migration

Just a couple more cents :wink:


Great feedback. Thanks.

And one more thing: I assume you can extract the article/story URL from the WordPress export and thus could write the redirects.json automagically so that poor users don’t have to sweat over losing Google indexed pages :slight_smile:

I’m trying to export with the plugin, but I’m getting an empty json. Tried increasing memory to 16k in php.ini and of VPS, but it doesn’t help(

How big is the wp blog? Can try to also increase php max_execution_time to 3600 or so.

there are 2500+ posts, 26 gb of images. max_execution_time is 3000

What hosting provider and resources? One thing I can think of is to temporarily boost server resources if this is an option (on Amazon this would be easy, just stopping instance, changing its type and restarting again, then after the import do the reverse process).

Later edit: I would try to optimize everything possible in the blog, i.e. smush images to reduce their file size, maybe use imsanity to reduce their pixel size also. I would try to run some db optimization, maybe wp-sweep or other dbase optimizing tools. A good plugin would be vevida optimizer (upgrades tables from myisam to innodb and adds an index into the tables to speed up search), etc.

thanks, I’ll try that.

Just make sure to create a backup of your blog first (wp-all-in-one-migration or something similar). Upgrading php to 7.2 might also help speed up things. The only issue I see is the size of the database, but that shouldn’t matter so much as the plugin doesn’t download the files, but if there are lots of links into posts and stuff that might create performance overheads.

I think I’ll make a local copy on my computer and will work with it

I have a self-hosted WordPress blog with over 4000 posts. I found out that I would need to install Ghost 1.0, export the WordPress XML file, run a converter to convert the XML to JSON, import to Ghost 1.0 and then update the new blog to Ghost 2.0.

After reading this post I think I’ll wait for Ghost 3.0. It seems Ghost hasn’t changed much from Ghost 0.1

1 Like

I’m in a similar position but just FYI, I haven’t had the greatest experience getting help on this issue: Timestamp Problem when Importing from Wordpress

Also, Ghost 2 only just came out (Sept 2018); 3.0 is a long way away so if you’re planning on migrating you should not worry about the next major release.

Hi, just in case, if you are planning to migrate from WP, you do not need to change tags from .json file. Import whole WP site to your local machine. Go to dashboard>posts>tags
Delete all the tags from WP
now go to
At the bottom, you’ll see this:
Categories can be selectively converted to tags using the category to tag converter

This is a much easier way.

1 Like

Seems like an irreversible thing to do.

Why would I destroy all my tags?

I guess I would prefer a transition solution that didn’t require installing the last version of the software. Kind of like installing Windows XP to install Windows 10.

That’s upto you. Ghost uses tags as what categories are used for in WordPress. There will be too many tags in your Ghost import…

So I said import your WordPress site to your local machine. Alternatively, you can create staging of your site and work on that. Your original WordPress site will be untouched. If something goes bad, you can switch back to original WordPress.

Oh, I see, Did not know that about Ghost and WordPress categories. I use a few WordPress categories (e.g. Photography) and use tags to label posts (e.g. Manhattan, South Street). So tossing away the WordPress tags means all my imported photoessays would have one tag, Photography, in Ghost.

Perhaps Ghost isn’t the best solution for. I am evaluating Ghost, Jekyll/Hugo and Grav. Just trying to see if the grass is greener on the other side.

You can do both tags and categories in Ghost now with Dynamic Routing:

However, I am not sure how that works in terms of migrating from WP to Ghost (you probably need to hack the migration a bit). However, I think there are people on the forum who could help you with that.