How to Migrate from WordPress To Ghost

Post cover image

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:

## Migrating WordPress Content to Ghost

If you have an existing Wordpress blog and want to migrate the blog posts over to Ghost, below are the steps.

  1. Install the Wordpress Ghost Plugin (
    Ghost plugin page on Wordpress
  2. In the Wordpress admin console, on the left side go to Tools -> Export to Ghost
    Export to Ghost link
  3. Scroll to the bottom and press "Download Ghost File"
  4. Save the zip file to your Desktop
  5. Now head over to the Labs section of your ghost website at
  6. Click on "Choose File" and select the zip file that the Ghost plugin created and we edited, and click "Import"
  7. All of your posts with the images should now be imported into your Ghost site!

## How To Migrate WordPress Comments to Ghost

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.

  1. Head over to Disqus and signup for an account

  2. Once you have signed up check your email and click the Disqus verification link.

  3. You will be taken to a Disqus welcome page and you will need to click on the "Admin" button in the upper right

  4. Click on the "Your Sites" button in the upper left and then hit "+New"

  5. Fill out the Site profile details and click "Create Site"

  6. Fill out if you want to pay or use the ad supported version

  7. On the "Choose your platform" page click Ghost

  8. Click on the "Universal Embed Code" link and copy the first block of code it gives you.

  9. This Javascript code is going to be added to your Ghost theme to display your comments.

  10. Inside your theme, the file you are going to edit is post.hbs and is located at:

  11. Open up this file with a text editor

  12. 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):

  13. Paste the code you copied from Disqus right below that section and save.

  14. 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.

  15. 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

  1. On your WordPress Dashboard click on Plugins
  2. Click on Add New
  3. Search for Disqus
  4. Click Install Now
  5. Click Activate Plugin
  6. Click on Configure
  7. Fill in your Disqus username and password that you just signed up with
  8. Select Disqus site name and click Next
  9. Click on the Export Comments link
  10. Click on the Export Comments button
  11. Wait until you receive an email from Disqus saying the import is complete.
  12. Click the link in the email that Disqus sent to check on the status of Disqus processing your comments.
  13. 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.

  1. Log into Namecheap (or whatever host you are using).

  2. Click on the My Account tab in Namecheap and then Manage Domains. Next click on your domain name.

  3. 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.

  4. In custom DNS servers 1 - 3 fill in the following
  5. Now click Save Changes.

  6. Next log into your DigitalOcean account. Once logged in click on the Networking link at the top.

  7. Click on the Domains button on the left.

  8. 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!