How to migrate your website from WordPress to Ghost

The Ghost project is led by John O'Nolan and Hannah Wolfe, both of whom have been involved with Wordpress in the past. With WordPress, when you just want to blog and maybe have a couple of static pages, there's a lot of useless features cluttering it all up. Ghost is an attempt to build a back-to-basics, clean and efficient blogging system. It is designed to function purely as a blogging platform.

Also read: Basic Features of the Ghost CMS

Ghost is a blogging platform for knowledgeable developers.  A WordPress install can generally be hacked together with enough reading and tutorials, however Ghost is currently a bit touchy, and unless you are a developer you’re likely to find yourself spending a lot of time debugging issues. If you aren’t a developer, I suggest paying for someone to host and manage a Ghost website for you.

To actually migrate to Ghost is a pretty easy 3 step process:

1.          Set up a new Ghost blog somewhere,

2.          Migrate your images: Back up your wp-content/uploads folder, and upload it to a wp-content/uploads folder under your ghost install so that things all match up.

3.          Install the Ghost Export plugin for WordPress, and then export your WordPress blog to a .json file that you can then upload into Ghost

All in all the installation is quick.  The hardest part is getting all of the redirects set up in the web.config.  WordPress handles 301 redirects for you if you ever change a permalink, however Ghost has just introduced the concept of plugins, so the majority of things, like 301 redirects, you have to do yourself.

We can look at all these in greater detail below. But first, let’s look at the benefits of moving from WordPress to Ghost. These major benefits are attributable to Ghost:

• Page speed goes up and can load in as fast as 1 second (awesome!)

• Actual writing experience in Ghost is amazing and can inspire more writing. Remember that Google likes freshness.

Before you decide to move from WordPress to Ghost, consider these recommendations:

Use Ghost if:

•             Your blog is just starting out (301 redirects for a lot of history require setting them up the old fashioned way)

•             You care more about getting your ideas down than having people read everything you’ve written

•             Are a hacker/dev and want a site that runs on Node.JS (this is a big reason people love Ghost)

Now Back to Migrating 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.

In this post we will be discussing the following aspects of migrating from WordPress 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 (http://wordpress.org/plugins/ghost/faq/)
  2. In the Wordpress admin console, on the left side go to Tools -> Export to Ghost
  3. Scroll to the bottom and press "Download Ghost File"
  4. Save the file to your Desktop

    Keep this file for now, we will come back to it after we do the images.

Here are the necessary steps:

To move from WordPress, begin by installing the official plugin which exports the contents of your posts in a formatted JSON file. It is  recommended that if you have posts with images, you should install Cloudinary’s plugin. Cloudinary is a CDN network where you can host images. You can create a free account with some limitations if you have small image hosting needs. Make sure to upload your entire media library to Cloundinary before exporting (the plugin provides a bulk upload feature). Once your images are mirrored, any posts that contain images will have their links replaced with where they reside on Cloudinary. This is not a huge deal for people whose posts are just texts. Such people will not want to bother about images hosted anywhere else other than on own server, so a little time can be invested in manually correcting some posts that contained links to wp-content.

Installation

If you run on Todhost or a server that has a one-click installation option, this make things simple. If your webhost doesn’t have one click install, the manual method won’t take you much longer to do. Within a few minutes you can have Ghost running. To import WordPress JSON file, Just go to enterdomainhere.com/ghost/debug (where enterdomainhere is your real domain). It only takes a few seconds for it to import large number of posts. Once the posts were uploaded, you look into URL redirects to make sure existing RSS feed wouldn’t break for readers. Ghost developers smartly included a redirect for /feed which is the default path for RSS on WordPress.

Transferring Wordpress Images to Ghost

Now that you have a local copy of your WordPress content, we shift over to migrating your images over to Ghost. There are two steps to handle the WordPress images:

    Move the images from the server hosting WordPress over to the new server hosting Ghost.

    Modify the WordPress export of your content to point at the images on your Ghost server.

    Note: If you are hosting on Todhost, once you download your images, contact the support team and we can finish getting you setup since you don't have access to the backend

For the first step you can either:

    use an FTP application to pull down your WordPress images to your computer and push them up to your Ghost server (easiest)

    If you are unsure how to do this, it can differ for every host. It is usually best to contact the support team of the hosting company for your Wordpress blog and they can help you get the images.

Regardless of which method you use, on the Ghost server, the images need to end up in:

/var/www/ghost/content/images/

    If your ghost blog is somewhere other than /var/www then adjust the path above.

Once the transfer is complete make sure you set the ownership on all of images

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.

    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 Dashboard button in the upper right

    Click on the +Add button in the upper left

    Fill out the Site profile details and click Finish registration

    On the "Choose your platform" page click Universal Code

    On this page you will need to copy the Javascript code in the first. 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.hbs and 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):

    <section class="post-content">

        {{content}}

    </section>

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

    Upload your theme to get the new files in place. If you have Ghost running, stop and start it. Now when you navigate to a post, you will see a comment section

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 Comments link

    Click on the Export Comments button

    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 to your desired hosting account running Ghost

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 current registrar (or whatever host you are using).

    Click on the 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 todhost.

    In custom DNS servers, fill in the following

         ns1.todhost.com

         ns2.todhost.com

    Now click Save Changes.

That’s 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 web hosts have 24/7 online ticketing support who can do it for you or show you how to. This should have given you everything you need to transfer from Wordpress over to Ghost.

Please post your comments and share this post with others.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Basic Features of the Ghost CMS

Todhost web hosting supports Ghost installation. You can easily setup your website with Ghost...

Ghost Installation Tutorial

In this tutorial, we look at the various means to install the Ghost CMS. The options are to...

Ghost Configuration Tutorial

By default Ghost uses sqlite3 database. Still, if you would like to have your Ghost Blog...

Ghost Management Tutorial

How to use the Ghost Publishing Platform   In order to make it easier for users to deploy and...

Ghost Backup and Restore Tutorial

We shall in this tutorial cover the steps you need to take to bkkcup your Ghost website and also...

Powered by WHMCompleteSolution