Ghost 5 Migration
I've been meaning to move to Ghost 5 for most of the year. In a previous attempt, I found that Ghost 5 didn't support SQLite anymore and I wasn't up for setting up and maintaining a MySQL instance.
Then I found fly.io. I have been loving the simplicity of it. Being a docker compose fan, the transition to using
fly.toml was a breeze. The other great thing about fly.io is that its pretty cheap. Cheaper than the basic virtual machine instance I've been using for which the costs seem unreasonably high.
Then I found that Ghost 5 can actually run on SQLite, perhaps with some missing features. Since my use case is primarily a static website, it seems to work.
Another reason I wanted to move to Ghost 5, other than all the features such as built in search, comments and the new themes.
The migration itself took an hour tops. Since then, I've been customizing the theme and adding blog post thumbnails to give the site a nice aesthetic feel.
Broadly, the key migration steps are as follows:
- Create fly.toml file, copying the environment variables from docker compose.
- Create a fly volume that is referenced in the fly.toml file
- fly deploy the toml file
- Export the JSON file with site data and then import into new site via admin interface.
- Export the existing image files from previous website, download them to local machine. Then upload them to the new ghost instance via the same upload interface.
- Download and apply the
- Download and import existing members
- Apply customizations to themes such as the start here page and the home page.
Finally, after I was happy with how the setup looked in development, it was time to share the new site with the world.
This involved 2 key steps:
- Creating new SSL certificates via flyctl -
flyctl certs create <insert domain name>
- The command above provides DNS settings that need to be configured in the DNS provider.
- Change the
urlof the site in the
fly.tomlfile in the environment variable to point to the production site.