login to your server using the command lines.
Switch user
Switch to the user you used to setup your Ghost install for running Ghost commands:
sudo -i -u <user>
In my case I used: sudo -i -u ghost-mgr
Update Node
Run node -v
to check your node version.
If less than 14, update node:
curl -fsSL [https://deb.nodesource.com/setup_14.x](https://deb.nodesource.com/setup_14.x) | sudo -E bash -
sudo apt-get install -y nodejs
Update Ghost CLI
Ghost-CLI is an npm module that can be updated using npm: sudo npm install -g ghost-cli@latest
Update to the latest minor version
Before updating to a new major version, you must update your site to the latest minor version.
Update to the latest minor version:
- On Ghost 3.0 run
ghost update v3
- On Ghost 4.0 run
ghost update v4
If Ghost is not already running, run ghost start
, then login to Ghost Admin and check this update has worked before continuing.
Update to the latest major version
Before updating to a new major version, review breaking changes that might affect you.
Once you’re running the latest minor version, it’s time to update to the latest major version.
Finally, you can now run the update command again to upgrade to the latest major version:
ghost update