The complete guide for migrating from Squarespace to Ghost in 2020
2 min read

The complete guide for migrating from Squarespace to Ghost in 2020

This post will lean heavily on existing guides, bringing them all together to ensure that your blog content migrates without issues.

NOTE: This post already assumes you have installed Ghost. If you haven't, I recommend either installing Ghost Pro or going the Digital Ocean Droplet route by starting with these links which will set up your blog, Google Analytics, a custom domain and your SSL certificate:

Here are the steps you need to follow to migrate your content from Squarespace:

  1. Do a mass migration. Go to https://www.simonfacciol.com/squarespace-to-ghost/ and follow the instructions. This is the hardest step in the process as it will require you to install node.js locally. After this you may note that some of the images are missing and some of the internal links are not working anymore. We will address this in steps 2-4.
  2. Manually recover and reupload images. Using the script above will not actually recover images, instead they will be linked to and still hosted on the Squarespace CMS, moreover there will now be explicit HTML code in your posts that will be unreadable. Just delete this code, but don't forget the caption you had on each image.
  3. Set up a redirect rule. Set up a redirect.json file to make sure old permalinks point to the same blog posts. Here is the official guide on how to set up redirects. For myself, I had two "blogs" to export in Squarespace - one was called "posts" and the other was called "principles" (my example is at the bottom of the post).
  4. Review permalinks. Manually review each individual blog post for redirection. If you previously renamed a Squarespace post, there may now be an inconsistent URL in your old Squarespace blog and your new Ghost blog. Go through the archive of your Squarespace blog, selecting individual links and appending them to your Ghost blog address and seeing if they redirect correctly. If they don't, just rename the Ghost post permalink accordingly.
  5. Fix other embeds. As for embeds like videos and other extensions, you may want to handle them similarly to images, manually recovering the URL and finding ways to embed them in Ghost.
  6. Finalize your new domain. Change your domain to point to your new Ghost blog.

Example redirects.json file:

[
    {
        "from": "/posts\/([0-9]{4})\/([0-9]?[0-9])\/([0-9]?[0-9])\/(.*)",
        "to": "/$4/",
        "permanent": true
    },
    {
        "from": "/principles\/([0-9]{4})\/([0-9]?[0-9])\/([0-9]?[0-9])\/(.*)",
        "to": "/$4/",
        "permanent": true
    }
]

Feel free to tweet me any questions or additions at @p_e.