How to Update Ghost on Digital Ocean Droplet

ghost Oct 17, 2021

Ok, a few months pass by and you get a notification like this from Ghost:

Ghost Update Message

It's time to update your Ghost installation. It kinda sucks, but you have to do it, the only alternative is to use Ghost Pro

If you don't know which version of Ghost you're using, you can go here on your dashboard:

Click the Arrow next to your name:

Then click About Ghost:

As you can see above, am running Version 3.39.0 of Ghost.

I would like to update all the way to 3.42.1 and eventually to version 4.0 which is the current version.

Please Note:

Ghost doesn't allow you to update straight from your old version of version 3 straight to version 4. So let's say I have version 3.5 on my system, before updating to version 4.o, I will need first to get to the most recent version of version 3, which can be maybe 3.9 ...then from there I can update from 3.9 to 4. (I hope that's clear!)

That's why you see on my screen, I need to update to 3.42.1 from 3.39.0.

3.42.1 was the latest version of version 3. From there I will update straight to whatever version of version 4 is.

Also the following screenshot may be useful:

Major Ghost Releases

Okay, I use Digital Ocean for my Ghost Hosting and I pay about $6 per month ($5 - Hosting + $1 - Backup).

If you just got into blogging and you wanna know how you can use Digital Ocean with Ghost, please visit this blog post on how to install Ghost on Digital Ocean

Update Ghost on Digital Ocean

After the above rumbling, now back to business.

Muy importante: It's highly recommended to have a full backup of your site before doing any major updates. If anything breaks, you will still have your website.

I use Windows Powershell as my Command Line tool to do the update, but you can pick whichever Command Line tool works for you.

So after opening Powershell, put the following command: ssh [email protected] followed by the IP address of your droplet, just like you see below.

ssh [email protected]

Please replace that IP address with your own.

So here it's how it looks from Powershell:

Press ENTER on your keyboard, You may get the following message:

Type yes, just like you see above and then press ENTER

At this point enter the password for your droplet:

Please note you won't be seeing the characters as you're entering your password.

When you succeeded on entering the password, you will see a bunch of welcome screen message, and also you will see the following:

Now you're already in your droplet and you can update it.

Type the following command to enter to the Ghost CLI

After after you should see something like this:

Now we need to navigate to the Ghost installation folder:

Type the following command:

cd /var/www/ghost

On my window it looks like this:

Now you will be directed to the Ghost installation folder like you see below:



Now this is the point where things can get a bit tricky or you may start seeing some errors:

To avoid those errors, let's first update Ghost CLI, by typing the followng command:

sudo npm install -g [email protected]

On Windows Powershell it shows like this:

You have to hit ENTER after typing a command that goes without saying.

So after running the previous command you may see the following if your NPM is out of date:

To update your NMP version, run the following command

sudo npm install -g npm

While we're still here, let us update the Node version too by running the following command:

sudo npm install -g n

It looks like this on my window:

That command will install the n module. To install the recent stable version of Node please run the following command:

sudo n stable

It looks like this:

Run the Ghost Update

Now is the time to run the Ghost update command. Remember when I told you you can just go from a major version in this case version 4  without first updating to the latest minor version of 3.

So first I will update Ghost to the latest version of 3 by running the following command:

ghost update v3

In Powershell it looks like this:

It will take a few seconds,

Now do the major update by running the following command:

ghost update

That will get us to the most recent version of Ghost which as of writing is version 4.19

In the process you may be asked to check for theme compatibility, to which just agree Y (yes), and also go ahead to agreeing when asked if you wanna go ahead and install the recent version of Ghost.

That's it! Till next year. I normally do this work once a year...




Ami Amigo

Ami Amigo (pseudonym) is one of the main contributors to this blog. He is a tech aficionado, developer, blogger and an online instructor. Ami Amigo studied Computer Science and Philosophy in college

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.