/ bash

Migrating between two Ghost blogs

  1. Set up new host.
  2. On your old blog, under Settings: Labs/Export content. This will give you a json file with all your posts and settings, but not all your images.
  3. On your new blog, Labs/Import content. Upload the json file, and your blog should be reconfigured to match the old one.
  4. Settings: Design. Download your active theme, and upload it to the new host.
  5. Copying images: images are stored in a subdirectory of www; content/images. Use the scp command to move the contents of this directory between the two hosts:
    scp -i key.pem -r user@host.tld:/opt/bitnami/apps/ghost/htdocs/content/images /var/www/ghost/content/images
  6. Verify that your new image directory has the correct permissions, if not: sudo chown -R ghost /var/www/ghost/content/images/*
  7. Update any integrations - e.g.: RSS to Twitter - with your new URL.
  8. Resolve any user conflicts.
  9. Take a backup.

Slightly related: I ran into a problem updating Ghost on my new host, as the Ghost CLI version was too told. This command resolved it:

npm install -g ghost-cli@latest