Ghost Blog - How to Update

Ghost Blog - How to Update

The first step is to make a backup of the blog in case things break.

I copied the ghost folder to a backup folder:

cp /var/www/ghost-blog /home/ghost-blog/backup/

Also, exported a backup with the frontend option at :

Labs > Export your content

We are now ready for the update. Let's update the ghost CLI first:

ghost-blog@hv1-ghost-blog:/var/www/ghost-blog$ ghost version
Ghost-CLI version: 1.16.3
Ghost version: 3.41.6 (at /var/www/ghost-blog)
ghost-blog@hv1-ghost-blog:/var/www/ghost-blog$ ghost update 4.1.2
+ sudo systemctl is-active ghost_blog-infoitech-co-uk
✔ Checking system Node.js version
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✖ Checking for latest Ghost version
A CliError occurred.

Message: Unable to update Ghost directly to v4.1.2. You must be on the latest v3.x to update across major versions.
Help: Run "ghost update v3" to get the latest v3.x version, then run "ghost update" to get to v4.

Debug Information:
    OS: Ubuntu, v20.04.1 LTS
    Node Version: v12.20.2
    Ghost Version: 3.41.6
    Ghost-CLI Version: 1.16.3
    Environment: production
    Command: 'ghost update 4.1.2'

Additional log info available in: /home/ghost-blog/.ghost/logs/ghost-cli-debug-2021-04-04T17_43_55_241Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.

I have tried to issue the update command, however the CLI complained that the blog is not on the latest V3 and recommend an upgrade to the latest V3.

ghost-blog@hv1-ghost-blog:/var/www/ghost-blog$ ghost update v3
+ sudo systemctl is-active ghost_blog-infoitech-co-uk
✔ Checking system Node.js version
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version

# 3.42.4

No user-visible changes in this release.

---

View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/3.42.3...3.42.4
* Ghost-Admin - https://github.com/tryghost/admin/compare/3.42.3...3.42.4

✔ Fetched release notes
✔ Downloading and updating Ghost to v3.42.4
+ sudo systemctl stop ghost_blog-infoitech-co-uk
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
+ sudo systemctl start ghost_blog-infoitech-co-uk
✔ Restarting Ghost
ℹ Removing old Ghost versions [skipped]

Let's update to the latest v4 :

ghost-blog@hv1-ghost-blog:/var/www/ghost-blog$ ghost update 4.1.2
+ sudo systemctl is-active ghost_blog-infoitech-co-uk
✔ Checking system Node.js version
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version

# 4.1.2

*  Fixed 404 errors if navigation URLs are somehow blank - Kevin Ansfield

---

View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/v4.1.1...v4.1.2
* Ghost-Admin - https://github.com/tryghost/admin/compare/v4.1.1...v4.1.2

✔ Fetched release notes
✔ Downloading and updating Ghost to v4.1.2


Checking theme compatibility for Ghost 4.1.2

⚠ Your theme has 2 warnings

? View error and warning details? Yes

Warnings
    File: default.hbs
    - The {{@site.lang}} helper should be replaced with {{@site.locale}}

    File: index.hbs
    - The default visibility for posts in {{#foreach}} block helper has changed in v4.

    File: partials/navigation.hbs
    - The default visibility for posts in {{#foreach}} block helper has changed in v4.

    File: partials/post-author.hbs
    - The default visibility for posts in {{#foreach}} block helper has changed in v4.

    File: partials/post-meta.hbs
    - The default visibility for posts in {{#foreach}} block helper has changed in v4.

    File: partials/post-tags.hbs
    - The default visibility for posts in {{#foreach}} block helper has changed in v4.

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

Please review the full list of breaking changes at https://ghost.org/docs/changes/

? Are you sure you want to proceed with migrating to Ghost 4.1.2? (y/N) Yes
✔ Updating to a major version
+ sudo systemctl stop ghost_blog-infoitech-co-uk
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
+ sudo systemctl start ghost_blog-infoitech-co-uk
✔ Restarting Ghost
✔ Removing old Ghost versions

The upgrade completed. However, the current theme Ease has some incompatibilities, but we are going to ignore the warnings and proceed since the upgrade is for a new theme installation:

godofredoninja/Mapache
You can use the theme Mapache for ghost in: Blog - Magazine - Landing page - Personal page - Photographers. and in many other things - godofredoninja/Mapache

Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to Infoitech - [B]logging
Great! Next, complete checkout for full access to Infoitech - [B]logging
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.