My Ghost blog that was set up by the DigitalOcean 1-click installation failed to update a few times in 2019-2020. I was able to revert the failure using a backup image of my server.
Here is how to update and make sure that it will not fail. Follow these instructions as
root or with
sudo. The key is to have all the correct dependencies installed and up-to-date.
Before updating your Ghost blog, it is a good idea to download backups of your content. Visit your Ghost Admin > Labs > Export Content. You may also want to download your image and theme directory using SFTP.
- Check your Node version:
- If your Node version is not
v12.x.x(Node v12 Erbium LTS), follow the instructions to upgrade Node.
- Update the Ubuntu dependencies:
sudo apt-get update && sudo apt-get dist-upgrade -y
- Update npm:
- Update the Ghost-cli:
- Change user to
sudo -i -u ghost-mgr
- Change directory to Ghost installation:
ghost doctorand fix anything that needs to be fixed:
- Update Ghost: