Ghost upgrade failing

After some more digging around, it appears I’ve been able to solve my problem.

Here’s what I did, using this thread as the base;

First check where ghost is installed by running;
whereis ghost

gxxxx@xxxxxxxx:/var/www/ghost$ whereis ghost
ghost: /usr/bin/ghost /usr/local/bin/ghost

Then I checked the versions in both locations;

/usr/bin/ghost -v

gxxxx@xxxxxxxx:/var/www/ghost$ /usr/bin/ghost -v
Ghost-CLI version: 1.9.6
Ghost version: 1.25.3 (at /var/www/ghost)

/usr/local/bin/ghost -v

gxxxx@ghost-rikroukens-com:/var/www/ghost$ /usr/local/bin/ghost -v
Ghost-CLI version: 1.8.1
Ghost Version (at /var/www/ghost): 1.25.3

After that I had to run /usr/bin/ghost update --v1 which installed the latest version of Ghost v1 successfully

Then I ran /usr/bin/ghost update

gxxx@xxxxxxxx:/var/www/ghost$ /usr/bin/ghost update

  • sudo systemctl is-active ghost_rikroukens-com
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking for available migrations
    :heavy_check_mark: Checking for latest Ghost version
    :heavy_check_mark: Downloading and updating Ghost to v2.3.0

Checking theme compatibility for Ghost 2.3.0

:heavy_check_mark: Your theme is compatible.

You can also check theme compatibility at https://gscan.ghost.org

? Are you sure you want to proceed with migrating to Ghost 2.3.0? Yes
:heavy_check_mark: Updating to a major version

  • sudo systemctl is-active xxxxxxxx
    ? Sudo Password [hidden]
  • sudo systemctl stop xxxxxxx
    :heavy_check_mark: Stopping Ghost
    :heavy_check_mark: Linking latest Ghost and recording versions
  • sudo systemctl is-active xxxxxxxxx
    ☱ Stopping Ghost✔ Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
  • sudo systemctl is-active xxxxxxxx
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    ☱ Restarting Ghost✔ Checking content folder ownership
  • sudo systemctl start xxxxxxxx
    :heavy_check_mark: Restarting Ghost
    :information_source: Removing old Ghost versions [skipped]

This appears to have been affective, I now have v2.3.0 installed on my server.

Finally, to avoid any further issues in the future I run;

mv /usr/local/bin/ghost /usr/local/bin/ghost2 && ln -s /usr/bin/ghost /usr/local/bin/ghost

So I won’t have this issue in the future.

Hope this helps others.