How To Migrate Your Blog From WordPress To Ghost
If you are running a blog on WordPress and planning to migrate your WordPress blog to ghost platform, Here is the instructions for that. Through this blog post, I’ll show you how can you migrate your WordPress blog to ghost.
There are a few steps you need to follow to migrate all content (Posts, Pages, Images and Comments) from your WordPress blog to ghost. Below we have detailed process about WordPress to Ghost migration.
Note: We tried to make things sweet and short, That’s why some instructions are braked into part of separate pages. For your easiness to understand and find all the instructions, We have linked these where appropriate.
Migrating From WordPress To Ghost
Here is the complete guide to migrate your blog content like images, posts, pages and comments from WordPress to ghost. Follow the steps below as shown to make the migration easy without consideration of loosing a single byte of data.
Migrate Images From WordPress To Ghost
The ghost plugin for WordPress only exports WordPress posts and pages and It doesn’t migrate images from WordPress server to Ghost server. So we have to do it manually. We can do this using a 3rd party tool called Cloudinary (handling images with Cloudinary is fast and easy) or Manually change the image path in WordPress Export.
Migrate Images Using Cloudinary
Note: Using This system, Your images on WordPress will not move to Ghost server. Cloudinary will take your images on there cloud server. From where Cloudunary will serve images for your ghost blog.
The first step is creating a free account at Cloudinary and then install the Cloudinary plugin to your WordPress. Once the Cloudinary plugin is installed and activated on your WordPress, You will notice a new menu called Cloudinary in your WordPress.
Click on the Cloudinary > Settings. Now it will ask you to insert your
Cloudinary_URL that you can find on your Cloudinary dashboard.
On your Cloudinary dashboard, Scroll to the Account detais section and click on the
Reveal right after API Secret field to reveal the API key for your account. Now copy the cloudinary URL from Environment variable and paste into your WordPress
Cloudinary > Settings‘s
The Cloudinary URL will be similar to this:
After that, You are almost ready to upload all your images on WordPress to Cloudinary. To do that, Click on the media menu right after Posts on your WordPress. Now tick all the images and choose Upload to Cloudinary from Bulk Action and then click on the Apply button to start uploading images to Cloudinary account.
Manually Change The Image Path In WordPress Export
You can also upload of your images from WordPress to ghost server. The default Image directory for Ghost is
/content/images. You can use an FTP client to upload these images to your Ghost image directory. And I assume that you are technically enough in using FTP software.
Once all of your images uploaded to the Ghost image directory
/content/images, Now use your terminal to change the image path in your WordPress export file. Here are a simple command that will replace
sed -i .bak -e 's|wp-content\\/uploads|content\\/images|g' wp2ghost_export_1455382915.json
Above that command will replace image path on WordPress export file and make a new file called
wp2ghost_export_1455382915.json.bak that is the original file (In-case if you need).
Command credit goes to Ghost for Beginners.
Migrate WordPress Comments To Disqus
You know that, Ghost doesn’t have native commenting system and they recommend 3rd party commenting platform such as Disqus. I Assume that, You are going to use disqus on your ghost blog and If you are using native WordPress commenting system on your WordPress blog, Then you will need to migrate all of your post comments to Disqus. So Disqus will be able to load comments on your ghost blog once the migration gets complete.
To do that, The first step is, Creating an account at Disqus and then Install the Disqus plugin to your WordPress.
- Head over to Disqus and create an account with your email and user info.
- Once account creation is complete, Verify your email address.
- After that Visit Set up Disqus on a new site and fill the form with your site details and click finish registration.
- Install & Activate Disqus Comment System Plugin to your WordPress.
- Now configure Disqus comment system plugin in your WordPress with your Disqus username and password.
- After that, Export your WordPress comments to Disqus by clicking on the
Export Commentsbutton from
Plugin Settings. The
plugin settingsmenu will appear at the top right side right after
- Wait till Disqus send you the confirmation mail of Export completion.
Also note that, You will need to install the same Disqus comment profile to your ghost blog. And I Assume that you are technically enough to implement Disqus on your Ghost blog and If you need help on this, Head over: How to Install Disqus To Your Ghost Blog.
Now you are almost ready to start the post migration process. Follow the steps below to complete the migration.
Exporting Your WordPress Posts
The very first step is making an export of your WordPress posts and pages. The default file format for WordPress export is XML. But in order to make the export file work on Ghost blog, We need to create an export file with
Thanks to ghost team for making this easier. There is plugin in WordPress plugin repository called “Ghost” developed by Ghost team to export WordPress posts and pages into
.json format, So we can easily import WordPress posts and pages into our new ghost blog.
There is no critical things you will need to do to export your WordPress posts and pages with Ghost plugin. After installing and activating Ghost plugin on your WordPress, You will see a new menu called Export to Ghost inside Tools option.
Click on Export to Ghost menu. After that click on the “Download Ghost File” button to start downloading.
Note: Ghost Plugin for WordPress will ignore any Custom post types, Any Meta Data attached with Posts & pages, Comments (You need to migrate comments to Disqus that I’ve instructed some time ago) and short-codes.
Importing Content To Ghost
After doing all the things above, You are one step away from completing the WordPress to Ghost migration process. Now all you have to do is, Start importing the export file to your ghost blog.
I Assume, You have Ghost blog installed and If not, Read this Ghost installation Tutorial.
Now login to your newly installed ghost blog and visit
yourghostblogurl.com/ghost/settings/labs/ and click on the
Choose File button from import section.
Choose the file that you have exported from WordPress and hit on the Big IMPORT button to start importing all of your WordPress blog posts and pages to your ghost blog.