This post contains affiliate links, marked with . This means, if you make a purchase through such a link, I may earn a small commission at no extra cost to you. For more information, click here.

If you rely on a Ghost installation on DigitalOcean , you will have to update it from time to time. Here are the steps I take to make sure my Ghost installation is up-to-date.

First, backup: Whenever you want to make major changes to your Droplet, it is recommended to create a backup first. How exactly to do this is the subject of a future post.


Advertisement

Second, start the terminal and SSH into the Droplet with the command
ssh root@[yourdomain].
After you logged in, switch to ghost-mgr user as directed by DigitalOcean
sudo -i -u ghost-mgr.
Next, navigate to the Ghost installation location cd /var/www/ghost and check for available updates via ghost check-update. Finally, run ghost update command:
ghost update.

Terminal commands and output

If Ghost Manager is out of date, you will want to update that first and then run ghost update again. To update Ghost Manager, use the command:
sudo npm install -g ghost-cli@latest.

You need to pay attention to the terminal output. For example, if there are files or directories with incorrect permissions, you will be asked to run a chmod command:
sudo find ./ ! -path "./versions/*" -type f -exec chmod 664 {} \;”

After the successful update, you want to quit the ghost-mgr user using the command exit and restart the droplet by typing sudo reboot, and you are all done!

Ghost: Turn your audience into a business
The world’s most popular modern publishing platform for creating a new media platform. Used by Apple, SkyNews, Buffer, OpenAI, and thousands more.