How to update Ghost on DigitalOcean

· 1 min read
How to update Ghost on DigitalOcean

If you're self hosting Ghost on DigitalOcean, then you'll find yourself needing to update it at some point.  Below are the simple steps that I take periodically to ensure that my install is always on the latest version.

Before carrying on, it might be worth taking a backup of your current site.  This is always advised and is something I do if there's a major update to do.

Firstly, start the terminal within DigitalOcean or SSH in with:

ssh root@[yourdomain]

Once you're logged in, you need to switch to ghost-mgr:

sudo -i -u ghost-mgr

Next, navigate to your Ghost installation:

cd /var/www/ghost

Then, you want to see if there's updates available:

ghost check-update

If there is, then run:

ghost update

You may find that Ghost Manager is out of date so you need to update that using the following command:

sudo npm install -g ghost-cli@latest

When you're doing this, you may notice that you have a permissions warning so pay attention to what the output says.  If this does happen, the output will advise you need to run the below code:

sudo find ./ ! -path "./versions/*" -type f -exec chmod 664 {} \;”

And after all of the above, your Ghost installation should be up to date.  Exit the terminal (by using exit) and feel free to run sudo reboot.

Ghost

Create your own platform on the web. Ghost is a powerful app for new-media creators to publish, share, and grow a business around their content.

Start your space on the internet today