Ghost: Importing and Exporting CMS content

the problem

Ghost doesn't make it easy for you to migrate ghost installations if you don't have access to the underlying server (e.g. your ghost is a docker installation hosted on a service that doesn't allow you to access its container instance, like Zeit Co's Now)

where are my images from Ghost?

in content/images

Ghost provides

Ghost DOES NOT provide

why?

i can't think of a non-cynical answer to this so i prefer not to comment.

how do i export my images from my Ghost CMS?

The manual way

  1. inspect every image to find out its path in Ghost
  2. download the image
  3. replicate the file structure as defined in the current Ghost instance
  4. banner images: your image probably lives in src="/content/images/size/w2000/2019/06/Screen-Shot-2019-06-17-at-17.04.44.png", then your image file should sit in content/images/2019/06/Screen-Shot-2019-06-17-at-17.04.44.png

where

  1. post images: if your image is a local image within a post, it's probably not processed and served as-is, so copy paste the structure (e.g. /content/images/2019/06/Screen-Shot-2019-06-19-at-17.10.05.png)

wheretwo

  1. once you have all the images you need, zip the content folder and import the .zip file using Ghost's labs > import function.

The scraper way (untested)

  1. scrape image links on the existing website
  2. recreate the folder structure based on those links
  3. download all files (web scrape) and put them in the same structure
  4. output a .zip in order to upload onto the new Ghost instance.

The automatic way (untested)

WORK IN PROGRESS

some other refs