I use Ghost for my blog, in general its a nice simple blog platform to use. However it is an absolute dog to upgrade on anything but their official supported platform (Ubuntu). I don't use Ubuntu so leaves me out in the wilderness a little when I try to upgrade version.

This post roughly documents the steps I eventually sorted out when upgrading 2 of my Ghost blogs from version 3.x to version 4.4.

Minimal Tears

First thing to do is make an export of you existing blog. If you are the type of sysadmin I am then you have probably already thought 'I'll be right, I just won't cock it up' ... which is fair enough, except that you'll need the export later, its not for safety purposes. Stop your existing instance while you're here.

The main thing to note when running on a non-ubuntu platform is that you need to use what Ghost calls a 'local install'. I run my instance by symlinking to them, so for me, I created a new directory 'newghost-4.4' changed into and ran 'ghost install local' with some appopriate extra flags (port and paths etc) and then change the symlink. The symlink doesn't matter too much as apache is reverse proxying to a port, but it helps with helper scripts and stuff.

Despite adding the instance url to the install command, it didn't pick it up on the running instance ... this turns out to be a major issue, and you'll need to stop the instance and run 'ghost config url <actual url>' otherwise the instance won't start (it fails with a null url error).

After the instance is up and running (probably copy your dev config to prod config ... not sure how important it is, but I generally do that), go the admin page and set up your admin account.

Once that is done, go to the settings page (gear icon at the bottom) and then into the 'Labs' link. Select 'Delete all content' and then you can select 'Import Content' at the top and import your previous export (you did that right?).

You'll probably get an error or two about users existing and themes missing, nothing too serious for me at least. So at this point your new blog instance will be up and running ... this is where things went a little pear shaped for me ....

I found a lot of images that weren't loading, after some digging it turns out there is some kind of issue with the thumnails on some of my posts (but not all). I went back and edited out the thumbnails from the export (to use the full size image) but this didn't seem to help, Ghost must do some stuff internally with images.

I ended up needing to manually recreate the thumbnails (in content/images/size/w300 etc) from the originals. Even copying all the images over from the old blog didn't seem to help, there were still some missing. So I'm not sure if the new version of Ghost does something different with thumbnails or if I had/have a config issue in the old or new version, but the new version was expecting a lot of thumbnails to exist that weren't on the old site.

I ended up recreating them with ImageMagick, having a guess at the sizes that should be in each of the w300, w1000, w1400 etc subdirs. Thats seems to have fixed the issue and everything is running as expected, and I now have access t some better themes :)