Update a Ghost Blog

Update a Ghost Blog

Update a Ghost Blog
Photo by Manja Vitolic / Unsplash

Reference

1 Get the latest version:
curl -LOk https://ghost.org/zip/ghost-latest.zip OR a specific version curl -LOk https://ghost.org/zip/ghost-<version>.zip

2 Unzip to a temporary location:
unzip ghost-latest.zip -d ghost-temp

3 Change directory into your current ghost install:
cd path-to-ghost-install, E.g. cd /var/www/ghost

4 Remove the core directory completely:
rm -rf core

5 Change back to your download of Ghost latest:
cd path-to-ghost-temp E.g. cd ~/Downloads/ghost-temp

6 Copy the new core directory to your Ghost install:
cp -R core path-to-ghost-install

7 Copy the other key files to your Ghost install directory:
cp index.js *.json path-to-ghost-install
(optional) Update Casper by copying the casper folder:
cp -R content/themes/casper path-to-ghost-install/content/themes

8 Change back to your ghost install directory:
cd path-to-ghost-install
(optional) Update permissions:
E.g. chown -R ghost:ghost *

9 Upgrade dependencies:
npm install --production

10 Restart Ghost
E.g. service ghost restart or forever restart index.js or pm2 restart ghost or npm start --production


Update Ghost on Docker
Applicable Ghost Version: 5.x Backup Data Content cd /var/www/ghost/content Compress content contents zip -r content-files.zip images/ files/ media/ (Optional)Move the zip files from your server onto your local machine. scp user@remote_IP:/var/www/ghost/content/content-files.zip ~/Desktop/content-files.zip Built-in Export