Case Study

A cPanel server stuck half-way between Ubuntu 22.04 and 24.04: three hidden blockers, 90 sites offline

An agency ran about 90 client websites from one cPanel server. Its in-place upgrade from Ubuntu 22.04 to 24.04 with cPanel ELevate stopped half-way, after the web server had already been removed. We found three separate faults behind the stop, fixed each one without forcing anything, and finished the upgrade with every database, table and web package accounted for.

September 2026  ·  5 min read

SECTOR

Digital agency hosting client websites

SCALE

One cPanel account: 93 sites, 71 databases

PLATFORM

Ubuntu, cPanel & WHM, Apache (EasyApache 4), MySQL 8.0, CSF

ENGAGEMENT

Emergency: operating system upgrade failed part-way

3

Separate faults stopped the upgrade, each found and fixed in turn

5,141 / 5,141

Database tables before and after, in all 71 databases

176 / 176

Web server packages removed by the upgrade and restored

Environment

The morning of the upgradeAt about 04:08 the upgrade removes the web server packages by design and the sites go offline. At 04:10 it stops: a package pin had been deleted. At 05:03 it stops again: /boot is too small. At 07:16 it stops a third time: the MySQL repository signing key had expired. At about 07:30 the upgrade completes and every site, database and package is back.The morning of the upgrade (times from the server logs)≈ 04:08Sites offlineWeb packages removedby design (stage 2)04:10Blocker 1Package pin deleted,MySQL client unpinned05:03Blocker 2/boot: 173 MB free,260 MB needed07:16Blocker 3MySQL repository keyexpired in 2025≈ 07:30CompleteUbuntu 24.04, all sitesand databases backMail, DNS and FTP kept running throughout. The websites and, later, MySQL were down.

Scroll the diagram sideways to see all of it →

Each stop needed a different fix. Forcing the first one would have taken MySQL with it.

The problem

Stuck on an operating system cPanel was leaving behind. Newer cPanel releases no longer support Ubuntu 22.04, so the server’s nightly cPanel update had been stopping at the same compatibility check for days. The supported way forward is cPanel’s ELevate tool, which upgrades the operating system in place over several reboots. Part of its design is to remove all ea-* web server packages early and reinstall them at the end, so the sites are offline while it runs. This run stopped at stage 3 of 6, at 04:10, after those packages were gone. Because every client site lived in one cPanel account, one stopped upgrade meant about 90 websites offline. Mail, DNS and FTP stayed up throughout.

Investigation

Three faults, found one after another. The log pointed at a red herring, so we read the upgrade code instead. First: just before the distribution upgrade, ELevate deletes cPanel’s own apt pin file. That un-pinned mysql-client, Ubuntu offered a newer version than the vendor’s MySQL build, and Ubuntu’s upgrader refuses to start while any package is upgradable. Installing it was not an option: it conflicts with the vendor’s packages and would have removed the MySQL server. ELevate deleted the pin again on every retry, so we wrote ours under a different filename, after proving with a dry run that apt then saw nothing to upgrade. Second: the upgrade then ran for 11 minutes and aborted because /boot had 173 MB free and needed 260 MB. Third: once the new system booted, stage 4 failed because the MySQL repository’s signing key had expired in October 2025, so apt refused the repository and cPanel could not reinstall MySQL.

Each blocker had an easy forced fix. Every one of them would have broken something worse than the upgrade.

A fourth problem we nearly missed

The upgrade switched on a firewall that blocked our SSH port. At 04:10 ELevate enabled Ubuntu’s ufw firewall with a default-deny policy and only its own maintenance port open. This server’s SSH runs on a different port. We were still connected only because CSF’s rule for that port came first in the chain. Any CSF restart or flush would have left the server reachable only from the hypervisor console, in the middle of a half-finished upgrade. Before changing anything else we opened the SSH port in ufw as well and took a copy of ELevate’s state files and logs, so we had a way back.

At a glance

Challenge

An in-place Ubuntu 22.04 to 24.04 upgrade stopped half-way, with the web server already removed and about 90 sites offline.

Approach

Read the upgrade code and logs to find three separate blockers, testing each fix with a dry run before applying it.

Result

Upgrade completed on Ubuntu 24.04. 71 of 71 databases, 5,141 tables before and after, 176 of 176 web packages restored.

The fix

  1. Keep access, then back up: SSH port opened in ufw, ELevate’s state, archive and log copied aside
  2. Pin under our own name: a hold on mysql-client in a separate file in /etc/apt/preferences.d/, which ELevate does not delete. Tested first by pointing apt at a scratch copy of the pin directory: one upgradable package before, none after
  3. Free /boot surgically: purged one old kernel version (not the running one, and one more kept as a fallback). That freed 585 MB. The general clean-up command would have removed 34 unrelated packages as well
  4. Replace the expired key properly: fetched the vendor’s renewed key, checked its fingerprint matched before importing it, then removed our temporary pin. Marking the repository as trusted without a key was rejected
  5. Let ELevate finish: resumed after each fix, through the 24.04 reboot to stage 6 of 6
  6. Count everything: databases, tables, web packages, sites, services and pending updates checked against the numbers taken before

Outcome

Upgraded, with nothing lost. ELevate reported stage 6 complete with no blockers left. The server came back on Ubuntu 24.04 LTS with MySQL 8.0 running, all 71 databases and the same 5,141 tables as before, all 176 web server packages reinstalled and all 93 sites in place. Sample sites returned their full pages, every service including the CSF firewall was active, ufw was gone again, no updates were pending and the package database checked clean. Going by the server’s log timestamps, the websites were down from about 04:08: the web server was back at about 06:58 and MySQL at about 07:29, roughly 3 hours 20 minutes in all. These times come from log timestamps, not from an uptime monitor.

More case studies

99 cPanel Accounts Moved to CloudLinux

36 min to transfer 99 accounts and 178 GB

OpenCart Store Off Failing Hardware

321 → 676 MB free on /boot before the first kernel update

PHP2Shell Fleet Patching

500+ servers patched or mitigated

Planning an operating system upgrade on a cPanel server?

We check the blockers before the upgrade starts and stay with it until every site and database is counted back.