Start a conversation

Migrating From WordPress to Ghost

Before You Begin

  • Migration from WordPress to Ghost requires the use of the Ghost Plugin. To install this plugin you will need a self-hosted version of WordPress. If you’re unable to install WordPress locally, you can use a free service such as qSandbox to setup a disposable WordPress installation for the migration.
  • Disable any WordPress plugins currently running on your installation, as they may interfere with the export.
  • Make sure any categories are converted to tags. 

What Imports from WordPress

The Ghost Plugin will export:

  • Posts
  • Pages
  • Tags
  • Users (roles will be manually adjusted)
  • Description and website info 

The Ghost Plugin will not export:

  • Attachments
  • Comments
  • Images
  • Shortcodes
  • Custom post types

After setting up a local version of WordPress, follow the steps below to migrate your WordPress publication to Ghost.

Step 1: Install the Ghost Plugin

  1. Login to your localhost (or disposable) install of WordPress. Your login URL is usually at http://yourdomain.com/wp-login.php
  2. Go to Plugins > Add new
  3. Type "Ghost" into the Plugin Search field
  4. Find the "Ghost" plugin (by Ghost Foundation) and click Install Now
  5. Once installed, click Activate to turn on the Ghost Plugin

Step 2: Generate a Ghost Export File

  1. From the WordPress admin menu on the left, click Tools to expand the Tools menu
  2. Click Export to Ghost from the Tools menu
  3. Click the Download Ghost Export button at the bottom of the page to generate the .json export of your WordPress site

Note: Categories will need to be converted to tags before you download your Ghost file! WordPress provides a plugin for this conversion here.

Step 3: Preparing and migrating your images

Preparing your images
To move your images from WordPress to Ghost you will first need to download the image directory from WordPress. This directory is usually located at /wp-content/uploads/ within your WordPress installation on your server/localhost. 

Locate the /uploads/ folder within your image directory download, and rename it to /images/. Once renamed, zip the /images/ folder so that you now have a images.zip file. 

Your images are now ready for upload to your Ghost publication. 

Preparing your JSON file
Next, we need to prepare our .json export file we created from the Ghost plugin, so that our images reference the correct path within Ghost. 

The path of uploaded images within Ghost is similar to WordPress, the difference being the name of the folders used, ex. /wp-content/uploads/ (WordPress) and /content/images/ (Ghost).

To update the path of your images from WordPress to Ghost, perform a "Find and Replace" within the Ghost .json file and change all instances of \/wp-content\/uploads\/ to \/content\/images\/

Now that your  .json file is referencing the correct image paths, and your images.zip file is ready to go, proceed to the next step.

Step 4: Import data & images into Ghost

Follow the steps below to import your .json file and your images.zip file to your Ghost publication.

  1. Log in to your Ghost publication at http://subdomain.ghost.io/ghost/signin
  2. Go to Settings > Labs from the admin menu
    ghost1.0-admin-menu-labs.png
  3. Click Choose file to select the .json file created by the Ghost Plugin from your computer.
    import-content.png
  4. Click Import to import the .json file containing your WordPress data into Ghost.

Note: If you are having trouble uploading your image directory or your .json file into your Ghost(Pro) publication, please reach out directly to [email protected] for help.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Sarah Frantz

  2. Posted
  3. Updated