How to upgrade a Ghost blog in just 1 minute

I want to share my steps in a very easy-to-follow and short guide, just to upgrade a Ghost blog in just 1 minute.

A few minutes ago I just upgraded this Ghost blog to the last version for the first time. Let's see:

Backup

  1. Enter on your Ghost admin, go to Labs > Export and download the .json file.

  2. If you have any theme or self-hosted pictures, enter via FTP or SSH and download the content folder.

Upgrade Ghost

Login via SSH to your Ghost server.

Go to your Ghost folder, usually on var/www/ghost:

cd /var/www/ghost

Make a temp folder, download the lastest version and unzip it:

mkdir temp
cd temp/
curl -L -O https://ghost.org/zip/ghost-latest.zip
unzip ghost-latest.zip
cd ..

Now update the files and remove the temp folder:

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

If you run Ghost with an specific user, make sure the file permissions are right:

sudo chown -R ghost:ghost ./*

Final step: restart

If you are using forever:

forever restartall

If you are using PM2:

pm2 restart ghost

Or if you are running as service:

service ghost restart

Done! If you refresh the admin section, you won't see the upgrade notification message.