Ghost to Ghost migration

All,

TL;DR - can I just copy the images folder to a new install, or do I need to use the upload function? Or some command-line wizardry? Some image sizes aren’t working with my new theme…

My first self-host Ghost install (that runs my own site) was unfortunately a MySQL 5.7 install. I eventually wrangled it through upgrading to MySQL 8, but never convinced the Ghost CLI that it should actually run the upgrade all the way to current.

It seemed wisest to go ahead and upgrade the underlying infrastructure and then do a fresh Ghost install and migrate the content.

I installed a fresh Ghost instance, picked a new theme, and then did an import for content, followed by copying over the images folder. (Since they were on the same server, this was just a simple cp -r

Did it work? Well, sometimes. In switching themes, I’ve also inadvertently switched the set of image sizes Ghost is expecting, and some of these sizes are not present (nor are they generating on first request - broken sizes stay broken). Do I need to download the images as a zip and upload them to cause Ghost to recognize them in some way? Or is there a command line tool that’ll read the current theme and make the missing sizes?

Other trouble-shooting: New images are fine. Unsplash images are fine. Some sizes of every image are fine (so resizing the window makes the image appear). I’m using Casper with very minor modifications, and switching to another version of Casper does not resolve the problem.

UPDATE: Well, it happened again. I detailed the whole problem and then found my own solution. For anyone who comes after: I had a couple folders deep within content/images that were owned by the wrong user. I don’t know how that happened, but I fixed it, and now my images are serving! :)

2 Likes

I’m glad your fixed it. It’s my understanding that copying over the image folder should have worked, and based on how you resolved it, it sounds like that’s true… as long as the permission and ownership attributes are in good order. And good luck with self-hosting!

Oh, I’ve been self-hosting for a year. My main website lives in a $6/month VPS and it’s been all good except for my poor choice to start out on MySQL 5.7 because that was the default at the time! Oh, and some wrangling with outbound email early on.

I also have a Ghost Pro account, and backwards from what any sane person would do, my Ghost Pro account is for testing, and my important stuff is self-hosted. laughs But that way whenever I need to know how exactly something works on Ghost Pro, I can just load up whatever it is and then blow it away later. (I’ve used it for making sure Phantom Admin API calls worked, for testing Stripe integration settings, for setting up institutional access, etc. It’s easier to pay for Ghost Pro than to try to perfectly mimic it.)

Makes sense to me.

To make sure I know if there’s a problem with my self-hosted sites, I use Uptime Robot:

1 Like