login to your server using the command lines.
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
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
Ghost-CLI is an npm module that can be updated using npm:
sudo npm install -g ghost-cli@latest
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.
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: