How to update Ghost 3.x on Ubuntu 18.04 LTS
#
IntroductionMy 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.
#
BackupBefore 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 Dependencies- Check your Node version:
- If your Node version is not
v12.x.x
(Node v12 Erbium LTS), follow the instructions to upgrade Node.
#
Steps- Update the Ubuntu dependencies:
- Update npm:
- Update the Ghost-cli:
- Change user to
ghost-mgr
: - Change directory to Ghost installation:
- Run
ghost doctor
and fix anything that needs to be fixed: - Update Ghost: