How to Migrate from WordPress To Ghost
Migrating to Ghost from Wordpress does take a few steps at this point in time, but we will cover everything you need to get all your data over.
If you are haven't yet decided where to host your Ghost blog or need help on installing it, check out our post on where to host your Ghost blog
In this post we will be discussing the following aspects of migrating from WordPress to Ghost:
- Transferring WordPress content to Ghost
- Transferring WordPress comments to Ghost
- Pointing your domain at your new Ghost blog
If you have an existing Wordpress blog and want to migrate the blog posts over to Ghost, below are the steps.
- Install the Wordpress Ghost Plugin (http://wordpress.org/plugins/ghost/)

- In the Wordpress admin console, on the left side go to Tools -> Export to Ghost

- Scroll to the bottom and press "Download Ghost File"
- Save the zip file to your Desktop
- Now head over to the Labs section of your ghost website at
http://yourwebsite.com/ghost/settings/labs/ - Click on "Choose File" and select the zip file that the Ghost plugin created and we edited, and click "Import"
- All of your posts with the images should now be imported into your Ghost site!
At this time, Ghost does not have any built in commenting system. The most popular alternative is Disqus, so this section will detail how you can migrate all of your WordPress comments to Disqus and how to integrate your Disqus comments into Ghost.
The basic idea is:
- Sign up for Disqus account
- Install Disqus plugin in your WordPress blog
- Export comments to your Disqus account from within WordPress plugin
- Add Disqus comments into your Ghost blog
The details:
Disqus Account Sign Up and Integration into Ghost
If you purchased or download a theme, a bunch already have the disqus code in place and all the theme needs is your account number. Check out your theme documentation to see if it has that ready for you, but this section will assume there is nothing built in.
-
Head over to Disqus and signup for an account
-
Once you have signed up check your email and click the Disqus verification link.
-
You will be taken to a Disqus welcome page and you will need to click on the "Admin" button in the upper right
-
Click on the "Your Sites" button in the upper left and then hit "+New"
-
Fill out the Site profile details and click "Create Site"
-
Fill out if you want to pay or use the ad supported version
-
On the "Choose your platform" page click Ghost
-
Click on the "Universal Embed Code" link and copy the first block of code it gives you.
-
This Javascript code is going to be added to your Ghost theme to display your comments.
-
Inside your theme, the file you are going to edit is
post.hbsand is located at:/path/to/ghost/content/themes/casper/post.hbs -
Open up this file with a text editor
-
If you scroll down a little bit inside the file, you will see this code (assuming you are using the Casper theme, may be different if you are using another theme):
{{content}} -
Paste the code you copied from Disqus right below that section and save.
-
Now, copy the 2nd block of code that Disqus gave you, and paste it after the
</section>that you just pasted the comment code in. -
Upload your theme to get the new files in place. Now when you navigate to a post, you will see a comment section like the following screen shot!
Now we just need to migrate your existing comments over to Disqus.
Migrate WordPress Comments To Disqus
- On your WordPress Dashboard click on Plugins
- Click on
Add New - Search for
Disqus - Click
Install Now - Click
Activate Plugin - Click on
Configure - Fill in your Disqus username and password that you just signed up with
- Select Disqus site name and click Next
- Click on the
Export Commentslink - Click on the
Export Commentsbutton - Wait until you receive an email from Disqus saying the import is complete.
- Click the link in the email that Disqus sent to check on the status of Disqus processing your comments.
- If Disqus is done processing your comments you will see a message at the top saying so.
Now all of your comments are over on Disqus, so when you switch to Ghost, as long as the posts are the same domain name and URL (they should) the comments will come over no problem.
How to point your domain from WordPress To Ghost
The steps documented will be to point a domain purchased at Namecheap to your DigitalOcean droplet running Ghost.
We have chosen to document Namecheap and DigitalOcean because of their popularity, but almost every domain name registrar has similar steps. If you have questions, contact your provider and they can probably just do it for you.
-
Log into Namecheap (or whatever host you are using).
-
Click on the My Account tab in Namecheap and then Manage Domains. Next click on your domain name.
-
On this page click on Transfer DNS to Webhost. Then you have the option to input custom DNS Servers. By inputting custom DNS server you can configure where your domain name points to. In this example, we will input the nameservers for DigitalOcean.
-
In custom DNS servers 1 - 3 fill in the following
ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com -
Now click Save Changes.
-
Next log into your DigitalOcean account. Once logged in click on the
Networkinglink at the top. -
Click on the
Domainsbutton on the left. -
Now type in your domain name, and select the droplet that you want it to point to (probably the only one listed).
Thats it! It may take a couple hours to propagate through the system.
Again it may be different for your specific domain name registrar, but it should be a similar process. If you run into trouble, most of the big companies have 24/7 online chat support who can do it for you or show you how.
Closing Remarks
Hopefully this should have given you everything you need to transfer from Wordpress over to Ghost. If you run into any problems, feel free to leave a comment or tweet at us. Thanks for reading and have fun on Ghost!
