How to update ghost-cli for outdated versions when upgrading Ghost
Recently I was updating this Ghost blog to the current, last version 1.19.0
having installed ghost-cli@1.0.3
and finally I noticed I had to update ghost-cli first.
😓 After follow the instructions and guides running:
npm i -g ghost-cli@latest
npm update -g ghost-cli
It doesn't work and then running ghost version
at the blog folder, I got:
Ghost-Cli version: 1.0.3
😡 It's a bit annoying because this produces another different errors when upgrading Ghost.
How to update ghost-cli
😳 First I noticed npm update
script was killed by memory limit.
Double check it and if it's your case, like running your Ghost blog in a 512MB RAM VPS, so enable or increase your Swap space, you can read here How to add swap.
🔎 Then I found where was ghost-cli
, running:
locate ghost-cli
Then I found /usr/lib
so I moved to there with:
cd /usr/lib
And then:
npm update ghost-cli
I moved again to the blog folder and run ghost version
and finally ghost-cli
was updated 👇
👁 Note that while you are updating, if your blog goes down due to any error, you can recovery your blog with ghost update --rollback
👍
Then when you have updated your ghost-cli
, try again with ghost update
🤞
🤙 Leave a comment with your doubts or experiences!