How I Updated a Ghost Blog on DigitalOcean from an Old v3 to the Latest v4

Since this gave me a little trouble, I figured I'd share my process of updating a Ghost blog from an older v3 to the latest v4. I had used a DigitalOcean one-click setup initially, so I wasn't super clear on how to dig in and update the site.

First, log into the console on your server.

If you have an SSH key (recommended), use the following:

ssh -i ~/PATH/TO/YOUR/SSH-KEY YOUR-USER@YOUR-IP-ADDRESS

Or just SSH the less secure way:

ssh YOURUSER@YOUR-IP-ADDRESS

On the server, I had already installed the Ghost CLI, so I was met with a prompt from Ghost to switch my user to manage Ghost via the CLI (a.k.a. before running the update, in this case):

sudo -i -u ghost-mgr

Once you're in, this is where I got tripped up, since I'm no server expert. A quick 'ls' command showed me nothing, so I was really confused when I tried to update Ghost and it gave me the warning:

Working directory is not a recognisable Ghost installation. Run 'ghost update' again within a folder where Ghost was installed with Ghost-CLI.

Finally, I figured out that the correct directory for the DigitalOcean Ghost install is at (running this will also navigate to the correct directory to update Ghost):

cd /var/www/ghost/

Running the following gave me further instructions:

ghost update

Since I was running an older version of Ghost 3, I needed to first update to the latest 3.x version, but the prompts from Ghost (which appeared from using the command above) made it really easy. Following instructions, I ran:

ghost update v3

...and finally:

ghost update

We made it!


By the way if you want to try DigitalOcean, use my referral link to get a $100 credit for 60 days: https://m.do.co/c/5d4981832ae6