Skip to content

Instantly share code, notes, and snippets.

@maricris-sn
Last active August 29, 2015 14:05
Show Gist options
  • Save maricris-sn/a1a4a5b41647351c8399 to your computer and use it in GitHub Desktop.
Save maricris-sn/a1a4a5b41647351c8399 to your computer and use it in GitHub Desktop.
Upgrading Ghost
# Login to your server as root
# Stop ghost service to prevent database corruption
service ghost stop
# Do some manual backups
cd /var/www
CURRENT_GHOST_TAR=/var/www/ghost-$(date +"%Y-%m-%d").tar
tar cvf $CURRENT_GHOST_TAR /var/www/ghost
# Get latest
wget http://ghost.org/zip/ghost-latest.zip
# Prep for install
rm -Rf ghost/core
# Merge
unzip -uo ghost-latest.zip -d ghost
# Fix permissions
chown -Rf ghost:ghost ghost/*
# Install
cd ghost
npm install --production
# Restart
service ghost restart
# Some gotchas if ghost doesn't run
# make sure config.js' DAEMON var is the same as `which node`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment