Ghost Blog - How to Update
The first step is to make a backup of the blog in case things break.
I copied the ghost folder to a backup folder:
cp -r /var/www/ghost-blog /home/ghost-blog/backup/2024-02-25-12-00/
Also, exported a backup with the frontend option at :
We are now ready for the update.
1) Let's check our blog version.
2) We can now run ghost check-update
to check for new versions.
3) A new minor version is available, so let's upgrade. Before upgrading we need to install the latest ghost-cli
.
npm install -g ghost-cli@latest
Follow the steps throw if the upgrade complains of outdated packages and run the above command again to update your ghost-cli
In my recent upgrade, my node and npm packaged were outdated.
First, node
was upgraded to the ghost supported version with the commands bellow:
sudo npm install -g n
sudo n 18.17.0
Second, npm
was upgraded.
sudo npm install -g npm@10.4.0
npm -version
10.4.0
If the ghost `systemd ` module is changed make sure to reload systemd
.
sudo systemctl daemon-reload
4) Finally, upgrade your ghost blog instance.
ghost update 5.79.4
ghost ls
ghost start