Unable to update Ghost directly to v5: fix the v4.x error
The Ghost CLI will not jump from an older v4 release straight to v5. Run `ghost update v4` to reach the latest v4.x, confirm it with `ghost version`, then run `ghost update` again. Take a backup first with `ghost backup`. If the second step fails, check Node, MySQL and your theme.
Sohail Hussain8 min readShort answer
- Run ghost update v4 to move to the newest 4.x release, then run ghost update again to cross to v5.
- The CLI only crosses one major version at a time, and only from the last release of your current major, so this is expected behavior and not a bug.
- Take a backup with ghost backup before either step, because a major update changes the database.
You ran ghost update on a self-hosted site and got this:
Unable to update Ghost directly to v5.37.0. You must be on the latest v4.x to update across major versions.
The CLI is refusing to jump from an older 4.x release straight to 5.x. The version number in the message (v5.37.0 here) is just the newest release when the CLI looked, so yours may differ. The fix is the same.
Why it happens
Ghost treats each major version as a checkpoint. A major release brings database migrations and structural changes, and those migrations assume you are fully caught up on the previous major. So the CLI enforces two rules:
- You can only move up one major version per run.
- You must be on the latest release of your current major before you cross.
The error appears when you break rule 2, for example by sitting on 4.20 while 4.48 is out, or when you break rule 1 by trying to leave 3.x for 5.x. Users on hosting-specific forums, including a TurnKey Linux support thread from March 2023, report the same message, so it is not tied to one hosting setup. It shows up anywhere the Ghost CLI runs.
As of November 2026, the v5.37.0 in the message is an old example. If a newer major than v5 exists when you read this, the pattern still holds: finish the current major, cross one major, check the site, repeat.
Step-by-step fix
Run every command from your Ghost install directory, as the user that owns the install, not as root.
-
Run
ghost versionto see the CLI version and the Ghost version of the current install. -
Run
ghost backupto export your content, themes and config. If you can, also snapshot the server or the database; a major update changes the schema and a file backup alone may not be enough to undo it. -
Update the CLI itself with
sudo npm install -g ghost-cli@latest. An outdated CLI is a common source of odd errors in later steps. -
Move to the latest 4.x release:
ghost update v4 -
Run
ghost versionagain and confirm it reports a 4.x release. Open the public site and the admin to confirm both load. -
Cross the major version:
ghost update -
When it finishes, check the site, the admin, your theme and a few posts. The CLI checks theme compatibility during a major update, and a theme that uses features removed in the new version produces warnings.
You do not need the version number
Typing ghost update v4 makes the CLI pick the newest 4.x itself, so there is no need to look up or copy a specific release number.
If you are on 3.x or older
Each major is its own hop, finishing on the latest release of the version you are on. From 3.x the sequence is ghost update v3 (to reach the latest 3.x), then ghost update v4, then ghost update. Check the site between hops, not only at the end.
Problems that can appear on the second hop
Once you are on the latest 4.x, the original error goes away. Different ones can show up on the way to v5. This table maps the common ones.
| Cause | Symptom | Fix |
|---|---|---|
| Unsupported Node.js version | CLI lists supported Node versions and stops | Install a version from that list, then retry |
| MySQL 5.7 or MariaDB | Database check fails or the update is refused | Migrate to MySQL 8 before the v5 step |
| Theme uses removed features | GScan warnings during the update | Fix the flagged code or install a v5-compatible theme |
| Low memory or disk | Update dies partway, killed process or no space | Free disk, add swap, retry |
| Wrong user | File ownership or permission errors | Run as the user that owns the install directory |
Node.js version
Each Ghost major supports specific Node.js versions, and the one that worked for v4 may be rejected for v5. Read what the CLI prints rather than guessing. Running ghost doctor from the install directory also reports problems with the environment before you try again.
Database
Ghost v5 requires MySQL 8 in production, and MariaDB is not supported. If you are on MySQL 5.7 or MariaDB, migrate the database before the v5 step. This is the most disruptive requirement, so check it before you start, not after a failed update.
Theme warnings
A custom or older theme can break on v5. Run it through Ghost's GScan theme checker, which is also built into the admin theme upload, or fix the flagged code. For a third-party theme, check whether the author has released a v5-compatible version.
Database changes are not undone by a rollback
The v5 migration may already have altered your database by the time you notice a problem. Treat your backup as the real safety net, not the rollback command.
Rolling back
If the update breaks the site, the CLI can return the application files to the version you had before the last update:
ghost update --rollback
That reverts the application only. If the site is still broken afterward, restore the database and content from the backup you took in step 2. This is why the backup comes first and why a snapshot of the server is worth the few minutes.
Checklist before you try again
- You are in the Ghost install directory, running as the user that owns it.
ghost backupfinished, and you have a server or database snapshot if possible.- The CLI is current (
ghost-cli@latest). ghost versionshows the latest release of your current major.- Node.js is on a version the target major supports.
- Production database is MySQL 8 if you are going to v5.
- Your theme passes GScan for the target version.
- The server has free disk space and memory for the update.
Preventing it next time
Keep the install on the latest release of its current major, so a major jump is one command away. Read the release notes before moving to a new major, back up every time, and run the update on a staging copy if the site matters. Updating in small steps is easier to debug than catching up after years.
If nothing works
If the error persists after ghost update v4 succeeds, or a different error blocks the v5 hop, ask for help in Ghost's official support channels, or your host or server provider if they manage the install. If you use a pre-built image such as a TurnKey Linux appliance, their support is also worth trying, since they may patch the CLI or environment.
Include the full CLI output, the result of ghost version, your Node.js version (node -v), your database type and version, and what you already tried. Those details let someone diagnose it quickly.
Subject: ghost update fails when moving from 4.x to 5.x
Hello,
Running "ghost update" on my self-hosted Ghost install fails with:
"Unable to update Ghost directly to v5.37.0. You must be on the latest v4.x to update across major versions."
What I have already done:
- Ran "ghost update v4" (result: {paste output})
- ghost version: {paste output}
- Node.js: {output of node -v}
- Database: {MySQL 8 / MySQL 5.7 / MariaDB, version}
- Backup taken with "ghost backup": yes/no
- Server OS and hosting: {your setup}
Full CLI output with timestamps is attached. What should I check next?
Thanks,
{your name}
Common questions
Can I skip v4 and go straight to v5?
No. The CLI blocks it, and the block exists because the v5 migrations expect a v4 database that is fully up to date. Run ghost update v4 first.
Do I need to run ghost update v4 more than once?
Normally once. If it reports you are already on the latest 4.x, move on to ghost update. Confirm with ghost version between the two commands.
Will my content and themes survive?
Content lives in the database and is migrated by the update, which is why the backup matters. Themes are checked during the update; custom or older themes may need fixes for v5.
Is this error specific to v5?
No. The same rule applies to every major jump, so the message names a different version if you are on an older install. Finish the latest release of your current major, then cross one major at a time.
Explore: Email Marketing Strategy
Related Articles
414 Request-URI Too Large in n8n's Amazon SES node: fix
The error 414 Request-URI Too Large in n8n's AWS SES node means a server in the path refused a request whose URL was too long, which a long HTML body can cause when it travels in the URL. Send through the SES v2 API with an HTTP Request node, or use SES SMTP.
Access denied, bad outbound sender: Outlook cold email fix
"Access denied, bad outbound sender" (550 5.1.8) means Microsoft 365 has put your mailbox on its restricted users list for spam-like sending. An admin must unblock it under Restricted entities in the Microsoft Defender portal. Then clean your list, lower your volume and resume gradually.
Acoustic Campaign "Application error" on login: bookmark fix
Acoustic Campaign shows "application error" at login when you open it from a bookmark saved while you were logged in, because the bookmark carries the old session. Log out, type your pod URL (campaign-us-[X].goacoustic.com) into the address bar, log in, then save a fresh bookmark.
ActiveCampaign 502 Bad Gateway and Tags Failed to Load: Fixes
"Bad gateway Error code 502" in ActiveCampaign means Cloudflare, the proxy in front of the app, got no valid response from ActiveCampaign's servers. That is usually their side. Check the status page, retry in a clean browser session, clear cookies, then send support the Ray ID if it persists.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free