How to Upgrade Your Ghost Blog via Command Line

June 28, 2015

2015 06 28

Step 1: Navigate to Your Ghost Blog Directory

First, change the directory to the path where your Ghost blog is installed. For example, in my case, it's located at:

cd /var/www

Step 2: Download the Latest Version with wget

Use wget to download the latest version of Ghost:

wget https://ghost.org/zip/ghost-X.X.X.zip

Note: You can find the current version on the official website: https://ghost.org/download/

Step 3: Remove the Old Core Code

Delete the old core directory:

rm -rf ghost/core

Step 4: Unzip the Downloaded File

Unzip the file you downloaded into the ghost directory:

unzip -uo ghost-0.6.4.zip -d ghost

Step 5: Change Ownership and Permissions

Update the ownership and permissions for the Ghost files:

chown -R ghost:ghost ghost/

Step 6: Install New Dependencies

Navigate back to your Ghost directory and install new dependencies:

cd /var/www/ghost
npm install

Step 7: Restart Ghost

Finally, restart your Ghost blog:

pm2 restart ghost

Note: If you're not using pm2, you can use the following command instead:

service ghost start

Your Ghost blog should now be successfully upgraded!



Profile picture

Victor Leung, who blog about business, technology and personal development. Happy to connect on LinkedIn