Last active
August 29, 2015 14:05
-
-
Save maricris-sn/a1a4a5b41647351c8399 to your computer and use it in GitHub Desktop.
Upgrading Ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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