Mental Pivot

Notes and observations from a lifelong pursuit of learning.


Upgrading from Ghost 2.x to 3.0 on DigitalOcean

The good people at Ghost.org announced and released version 3.0 of their blogging CMS yesterday.

As expected for a major version release, the update comes with loads of new features. The biggest item of interest is the integration of memberships and subscriptions into the platform. This feature now makes it easier than ever for bloggers to monetize their content without resorting to intrusive advertising or having to share profits or user data with "middle man" platforms like Medium or Substack.

As for running the actual update, it didn't take long. I referred to my prior article "How to Update Ghost Blog Software on DigitalOcean" as well as the official Ghost.org installation page which was helpful. However, since I ran into a few hiccups, I thought I'd post the process here for others who might encounter the same problems.

Here are the steps I took to upgrade:

  1. Back up your site (content and theme).
  2. Launch your terminal app and root login to your site:

ssh root@[yourdomain]

3. Switch to ghost-mgr user as directed by Digital Ocean

sudo -i -u ghost-mgr

4. Navigate to your ghost install directory (you can use "which ghost" command to locate it if you don't know). Default for DigitalOcean is:

cd /var/www/ghost

5. At this point I tried to run "ghost update" but received an error that my Ghost CLI was out-of-date. Update the Ghost CLI:

sudo npm install -g ghost-cli@latest

6. Next I tried to run "ghost update" again but was told that my version of Node.js was incompatible. At the time of writing this article, it appears that the one-click droplet for Node.js on DigitalOcean uses version 8.10.0.

Ghost 3.0 requires 8.16.0 or better, 10.13.0 or better, or 12.10.0 or better.

To update your version of Node.js run this command in the terminal (I opted to move to v10.x):

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

And then install with:

sudo apt-get install -y nodejs

7. Now you are ready to update to Ghost 3.0. We will use the --force option which will reinstall all dependencies (read more about the "update" command here):

ghost update --force

Be patient, the update took quite a bit of time to complete for me.

8. Lastly, the installation process will check your theme compatibility and alert you to any potential theme errors. You can always visit the Gscan page to check for theme issues.

That's it. Hopefully your Ghost update goes as smoothly as mine did and you can get back to using Ghost and exploring all the cool new features.