DigitalOcean: Upgrade From Ghost 0.11.x to Ghost 1.x.0
In this tutorial, I'll show you how to upgrade your Ghost blog from Ghost 0.11.x to Ghost 1.x.0 on DigitalOcean.
Firstly, backup your Ghost database and images. Then SSH into your DigitalOcean droplet and stop Ghost:
service ghost stop
Now let's make a copy of the old Ghost folder and install the new Ghost folder.
cd /var/www sudo mv ghost ghost-old sudo mkdir ghost
We will now install the Ghost CLI - CLI tool for installing & updating Ghost.
sudo npm install -g ghost-cli
Afterwards, we will give the ghost user permission to the new ghost folder.
sudo chown -R ghost:ghost ghost/
Now change to the new ghost directory:
Let's get and copy the MySQL root password (root_mysql_pass):
Now that we have the Ghost CLI installed, let's use it by installing Ghost:
You will be prompted with questions about the Ghost installation:
blog url: [blog url] MySQL Hostname: localhost MySQL Username: root MySQL Password: [root MySQL password goes here] Database Name: [enter a database name] Setup Nginx: no Setup Ghost MySQL User: Y Setup Ghost System User: Y Setup systemd: Y Start Ghost: Y
Node Version Error
If you get an error about the wrong version of node; use the following commands:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
Then try again.
Setting Up the New Install
Once you have installed Ghost 1.x.0, we can bring back your old content, images and theme.
Log in to your Ghost account and go to Settings -> Labs. Then import the database backup.
Now let's get all of your old images to the new install:
sudo cp -R ../ghost-old/content/images/* content/images/. sudo chown -R ghost:ghost ./*
You can upload your theme from the Ghost administration panel (Settings -> Design) or use the following command:
sudo cp -R ../ghost-old/content/themes/[theme_name] content/themes/. sudo chown -R ghost:ghost ./*
Where [theme_name] is the theme folder name.
Congrats, you have installed Ghost 1.x.0 and brought back your old content. We can now start Ghost again: