In this post, I’ll be giving you a step-by-step guide on how to update your Ghost CMS on a Digital Ocean Droplet. So let’s get started!
First of all, get access to your droplet via ssh. If you selected a One-Time-Password as your authentication method for your droplet, you can use:
ssh [email protected]<IP Address of Your Droplet>
If you selected SSH keys, on the other hand, you have to run the following command:
ssh -i /path/to/your/keys [email protected]<IP Address of Your Droplet>
After logging into your server, run:
sudo -i -u ghost-mgr
Then you need to access the ghost folder to be able to run all ghost commands properly:
Next, check if you've got the latest Ghost-CLI version by running:
sudo npm i -g [email protected]
Maybe you want to first backup all your posts before updating Ghost. It's actually not mandatory but recommended. For that, I found this article useful.
Last but not least, update the Ghost CMS with:
If this is not working due to a lack of memory then try to run this command:
ghost update --no-mem-check
Did everything work? Yes? Then congratulations, you successfully updated your Ghost CMS on a Digital Ocean droplet. There's just one final step, which is to remove the older version.
For that, you have to go into the folder versions. If you're still at /var/www/ghost, then execute this command:
After that, remove the older version by running:
rm -r <name of older version>
That's all folks! Thanks for reading! I hope I could help you update your Ghost CMS on a Digital Ocean droplet.
With this link below you get $100 in credit over 60 days on DigitalOcean. In my case, this would be equivalent to a subscription period of 16.5 months. The link below is an affiliate link, so that means when you've spent your first $25 of your $100 free credits on DigitalOcean, I'll get a little commission on that. If you want to support my blog, don't hesitate and use the link below. Otherwise, feel free to use Google and search for DigitalOcean. You've got the full choice!