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.
Second, start the terminal and SSH into the Droplet with the commandssh root@[yourdomain]
.
After you logged in, switch to ghost-mgr user as directed by DigitalOceansudo -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
.
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!