Update: This process works for upgrading Ghost between versions 0.11.4 - 0.11.9.
Even though it feels like we just did this, upgrading is important. Also, I think some of the extra overhead I had in my 0.11.3 -> 0.11.4 instructions for Digital Ocean upgrade was apparently due to some of the issues I unintentionally introduced. So I'm posting this as an improvement.
On DigitalOcean
root@ghost:~# service ghost stop
root@ghost:~# cat .digitalocean_password
root@ghost:~# mysqldump -u ghost -p ghost > ghostdb_backups/ghostdb_backup_20170223.sql
root@ghost:~# less ghostdb_backups/ghostdb_backup_20170223.sql
root@ghost:~# cd /var/www/
root@ghost:/var/www# cp -a ghost ghost-0.11.4
root@ghost:/var/www# tar -czf ghost-0.11.4-before-update.tgz ghost-0.11.4
root@ghost:/var/www# mv ghost-0.11.4-before-update.tgz /root/
root@ghost:/var/www# cp /root/Ghost-0.11.5.zip .
root@ghost:/var/www# unzip -d ghost-0.11.5 Ghost-0.11.5.zip
root@ghost:/var/www# rm Ghost-0.11.5.zip
root@ghost:/var/www# rm -rf ghost/core
root@ghost:/var/www# cp -a ghost-0.11.5/core/ ghost/
root@ghost:/var/www# for ext in md js json; do cp -a ghost-0.11.5/*${ext} ghost/; done
root@ghost:/var/www# diff ghost/config.js ghost/config.example.js
root@ghost:/var/www# rm ghost/config.example.js
root@ghost:/var/www# rm -rf ghost/node_modules
root@ghost:/var/www# cd ghost
root@ghost:/var/www/ghost# npm cache clean
root@ghost:/var/www/ghost# npm install --production
root@ghost:/var/www/ghost# chown ghost:ghost *
root@ghost:/var/www/ghost# chown root:root config.js
root@ghost:/var/www/ghost# chown -R ghost:ghost node_modules
root@ghost:/var/www/ghost# service ghost restart
root@ghost:/var/www/ghost# cd .. && rm -rf ghost-0.11.4 && rm -rf ghost-0.11.5
Note that just like before I backed up the current /var/www/ghost
directory and the database before doing anything. Always remember your backups! Also note that, unlike last time, I didn't experience issues just using the latest Ghost tarball from Ghost. So ¯\_(ツ)_/¯
On Heroku
Update 0.11.4
to 0.11.5
in package.json
:
{
"name": "ghost-on-heroku",
"description": "Just a blogging platform on Heroku.",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/cobyism/ghost-on-heroku.git"
},
"bugs": "https://github.com/TryGhost/Ghost/issues",
"private": true,
"version": "0.11.5",
"dependencies": {
"casper": "TryGhost/Casper#1.3.5",
"ghost": "0.11.5",
"ghost-s3-storage-adapter": "3.0.4",
"ncp": "^2.0.0",
"pg": "latest"
},
"engines": {
"node": "~4.7.3"
},
"scripts": {
"postinstall": "ncp node_modules/casper content/themes/casper",
"start": "node server.js"
}
}
Then re-deploy your app in Heroku. Note that since Casper (Ghost's default theme) is still at v1.3.5 for 0.11.5 you do not need to change its version.