How to Update Ghost
Currently Ghost does not have an automated way to update. This will come in the future, but as of right now, you may have to make the updates yourself. We are going to show you how to update on our three recommended platforms, Ghost(Pro), DigitalOcean, and Amazon EC2.
In order to get the latest version of Ghost on Ghost(Pro), you do not actually need to do anything. After a new version is released, the Ghost team will automatically update everyones version!
We have created a script that will automatically update your Ghost blog on DigitalOcean. Here is how to run that script:
SSH into your DigitalOcean droplet:
Run the following command to update Ghost:
sudo wget -O - https://ghostforbeginners.com/updateghost-digitalocean | sudo bash
- And thats it! Once you see the message
###### Ghost Started ######, your Ghost version has been updated and restarted for you!
502 Bad Gateway Error: If you get this error, it means that
npm install --productionprobably failed. This happens often on the $5 droplets. To fix this error, you need to add swap memory. Here are the instructions for that.
Once swap has been added. Do the following commands and it should fix your problem:
cd /var/www/ghost rm -rf node_modules npm install --production service ghost restart
Other Setups/Manual Commands
- Stop Ghost
service ghost stop(on DigitalOcean)
/var/www/on most platforms
curl -L -O https://ghost.org/zip/ghost-latest.zip
sudo cp temp/*.md temp/*.js temp/*.json .
sudo rm -R core
sudo cp -R temp/core .
sudo cp -R temp/content/themes/casper content/themes
sudo npm install --production
sudo rm -R temp
sudo chown -R ghost:ghost ./*
- Start Ghost
service ghost start(on DigitalOcean)
And thats it! Check out our next post on how to use a custom domain name with Ghost!