Skip to content

Upgrade cPanel from AlmaLinux 8 to AlmaLinux 9 in place with ELevate

A runbook for using cPanel's elevate-cpanel script to move a live cPanel & WHM server from AlmaLinux 8 to AlmaLinux 9 — the blocker checks, the offline window, and the post-upgrade validation.

cPanel maintains elevate-cpanel, a fork of the AlmaLinux ELevate project, that upgrades a cPanel & WHM server from AlmaLinux 8 to AlmaLinux 9 in place — same hardware, same IPs, same accounts, no transfers. It works, and for a densely packed shared host it can be the least disruptive option available. It is also the riskiest single maintenance you will ever run on that box. The server is genuinely offline for part of it, the upgrade is not reversible, and your only real rollback is a snapshot you took before you started. This runbook covers the decision, the pre-flight checks, what the window actually looks like, and how to prove afterwards that nothing quietly broke.

What you’ll accomplish

  • Decide honestly whether an in-place elevate beats provisioning a fresh AlmaLinux 9 box and transferring accounts.
  • Clear every blocker the pre-upgrade check reports, before you book a window.
  • Capture a restorable snapshot and a behavioural baseline you can diff against afterwards.
  • Run the staged upgrade, monitor it through its own log, and survive the reboots.
  • Validate httpd, EA-PHP, the database, Exim, Dovecot, and every customer vhost against that baseline.

Prerequisites

  • A cPanel & WHM server running AlmaLinux 8 on x86_64, with root SSH access.
  • Out-of-band console access — a hypervisor console, IPMI, or a provider rescue console. If the box does not come back on the network mid-upgrade, SSH will not save you. Do not start without this.
  • The ability to take a block-level snapshot or full image of the server’s disks, and a tested way to restore it. cPanel account backups are not a rollback here; they restore accounts onto a working server, not a working server onto a broken one.
  • A maintenance window measured in hours, agreed with whoever owns the sites on the box.
  • CloudLinux servers are not on this path. The elevate-cpanel script’s AlmaLinux 8 to 9 route is for vanilla AlmaLinux; CloudLinux publishes its own upgrade procedure for CloudLinux OS. If you are unsure which one you are running, cat /etc/redhat-release settles it, and CloudLinux vs vanilla covers the difference in behaviour.

Version note: the script is actively developed and the set of supported source and target distributions has expanded over time. Everything below is written to be driven by what the script’s own check output says on the day you run it, rather than by a list of blockers that ages badly.

How it works

elevate-cpanel is not a single command that swaps packages. It is a supervisor: it validates the server against a list of known-bad conditions, installs a service so it can resume itself across reboots, hands the actual distribution transition to the upstream ELevate tooling, and then does the cPanel-specific rebuild work on the other side — cPanel’s own RPMs, EasyApache 4 packages, service configuration.

Timeline of an in-place elevate showing four phases, the reboots between them, and the window where the server is offline

The consequence of that design is the part vendors gloss over: between the first reboot and the point where services come back, the machine is serving nothing. Not degraded, not slow — down. HTTP, mail delivery, IMAP, cron, everything. Anyone describing an in-place major-version upgrade as something customers will not notice is describing a different operation.

Step-by-step

  1. Bring the server fully current on AlmaLinux 8 first. The check will refuse to proceed on a stale cPanel version, and a half-updated OS makes every later failure harder to attribute.

    /usr/local/cpanel/scripts/upcp --force
    dnf -y update
    cat /etc/redhat-release

    Expect upcp to finish with no failed items, and /etc/redhat-release to print something like AlmaLinux release 8.10 (Cerulean Leopard) — the newest 8.x your mirrors carry. Reboot now if the kernel changed, and confirm the box comes back cleanly. A server that will not survive an ordinary reboot will not survive this.

  2. Capture a baseline you can compare against. This is the step people skip and then regret, because “did that site work before?” is unanswerable at 3 a.m.

    rpm -qa | grep -E '^(ea-|cpanel-)' | sort > /root/pre-elevate-packages.txt
    whmapi1 php_get_installed_versions
    mysql -e 'SELECT VERSION();'
    awk -F': ' '$1 != "*" {print $1}' /etc/userdomains | sort -u > /root/pre-elevate-domains.txt

    Then record what every domain currently returns:

    while read -r d; do
      printf '%s %s\n' "$d" "$(curl -o /dev/null -s -w '%{http_code}' -m 10 "https://$d/")"
    done < /root/pre-elevate-domains.txt > /root/pre-elevate-http.txt

    You should end up with one line per domain and a three-digit status beside each. In WHM, also save the current EasyApache 4 configuration as a profile so you have a named artifact to compare against.

  3. Take the snapshot, and confirm you can restore it. Hypervisor snapshot, SAN snapshot, or a full image — whatever your platform offers, taken with the server shut down or quiesced if that is an option. Write down how you would restore it and roughly how long that takes. If the answer is “I’m not sure”, stop here and rebuild instead.

  4. Install the script and run the check. Fetch it from the cpanel/elevate repository from the release branch. Check the README before you run this: the path has moved before, and the repository is the authority on where the current script lives.

    # Confirm the current script path in the cpanel/elevate README
    wget -O /scripts/elevate-cpanel https://raw.githubusercontent.com/cpanel/elevate/release/elevate-cpanel
    chmod 700 /scripts/elevate-cpanel
    /scripts/elevate-cpanel --version

    --version printing a version string confirms the download is intact and executable. Then:

    /scripts/elevate-cpanel --check

    This is read-only. It either reports that it found nothing blocking, or it prints a list of problems with remediation guidance for each. Treat that output as the authoritative list for your server — it knows things about the current supported matrix that no article does.

  5. Clear the blockers it names, one at a time. The categories that come up most often on a real shared host:

    • Third-party repositories. Anything outside the cPanel and AlmaLinux repos can drag in packages with no AlmaLinux 9 equivalent. grep -l 'enabled=1' /etc/yum.repos.d/*.repo shows you what is active; disable or remove what you do not need, and plan to reinstall the ones you do afterwards, from AlmaLinux 9 builds.
    • Database version. Some MySQL and MariaDB releases available on AlmaLinux 8 simply do not exist for AlmaLinux 9. If the check names yours, upgrade it beforehand through WHM’s SQL Services area, and take a mysqldump of everything first.
    • EasyApache 4 packages. EA-PHP versions and modules with no AlmaLinux 9 build have to go, which means moving the accounts that use them. Do that as its own project first — migrating a server-wide PHP version walks through finding which accounts are affected.
    • Disk space and boot configuration. The upgrade needs headroom on / and on /boot. Clear old kernels and stale backups before, not during.
    • Licensing. Confirm the cPanel license matches the server it is on, and that nothing else on the box is licensed per-OS-version. A license mismatch discovered mid-upgrade is a bad surprise.

    Re-run --check after each fix. Do not start until it comes back clean.

  6. Book and announce the window. Give a real range, not a best case. Tell customers mail will queue at the sending side and sites will be unreachable, not slow. Silence anything that pages on downtime, and make sure a second person knows the plan and has the snapshot details.

  7. Start the upgrade. From a root shell with the console already open in another window:

    /scripts/elevate-cpanel --start

    It will confirm before committing. Once it does, it takes ownership of the machine: it installs a service so the upgrade resumes automatically after each reboot, so you do not need to keep the SSH session alive or wrap it in screen. Note the log path it reports on startup — take it from that output, not from an assumption.

  8. Watch, do not touch. From a second session, or from the console once SSH drops:

    /scripts/elevate-cpanel --status

    and tail the log path the script gave you. Expect long quiet stretches during package transactions, and expect SSH to disappear entirely across the reboots. Do not reboot the box yourself, do not run dnf by hand, and do not restart services to “help”.

  9. If a phase stops, read what it says. The script reports which stage failed and what it wants you to do, including how to resume. Use exactly the command it prints. Improvising a dnf transaction on a half-converted system is how a recoverable stall becomes a restore-from-snapshot.

Validate it works

Getting to a login prompt on AlmaLinux 9 is not the finish line. Work through this before you tell anyone it is done.

cat /etc/redhat-release
/usr/local/cpanel/cpanel -V
whmapi1 servicestatus

/etc/redhat-release should now name a 9.x release, and servicestatus should show every enabled service up. Then verify cPanel’s own packages and hunt for leftovers from the old distribution:

/usr/local/cpanel/scripts/check_cpanel_rpms --fix
rpm -qa --qf '%{NAME} %{RELEASE}\n' | grep 'el8'

The grep ideally returns nothing. Anything it lists is a package that did not get replaced — usually from a third-party repo — and each one needs a decision: reinstall from an AlmaLinux 9 build, or remove.

Web and PHP:

httpd -t
whmapi1 php_get_installed_versions

httpd -t should print Syntax OK. Compare the PHP version list against what you recorded in step 2; if a version is missing, the accounts that used it have silently fallen back to the default handler.

Database and mail:

mysql -e 'SELECT VERSION();'
exim -bV
exim -bpc
systemctl is-active dovecot
tail -n 50 /var/log/exim_mainlog

The queue count from exim -bpc will be elevated right after the window — that is the mail that arrived while you were down, and it should drain over the following minutes. Watch exim_mainlog for deliveries completing rather than looping.

Finally, re-run the vhost sweep and diff it against the baseline:

while read -r d; do
  printf '%s %s\n' "$d" "$(curl -o /dev/null -s -w '%{http_code}' -m 10 "https://$d/")"
done < /root/pre-elevate-domains.txt > /root/post-elevate-http.txt
diff /root/pre-elevate-http.txt /root/post-elevate-http.txt

No output from diff is the signal you want: every domain returns exactly what it returned before. Any line that changed is a site to investigate by hand.

Troubleshooting

The check names a blocker you cannot place. Read its remediation text in full before searching for the message online; the script usually names the offending package or repo file directly. The most common “where did that come from” answer is a monitoring agent or backup client installed years ago from a vendor repo nobody documented.

Apache will not start after the upgrade. Run httpd -t first — it names the file and line. A third-party module built against the old distribution is the usual culprit, so check the el8 leftovers list. Once the config parses, /scripts/rebuildhttpdconf followed by /scripts/restartsrv_httpd puts a clean generated config in place.

Sites are suddenly running a different PHP version. An EA-PHP version with no AlmaLinux 9 build was removed, and the accounts pointing at it fell through to the default. Compare whmapi1 php_get_installed_versions against your baseline, then re-map the affected accounts in MultiPHP Manager. Expect breakage in old plugins and themes, not just a version-number change.

The database will not come up. Check systemctl status for the database service and read the error log in the data directory before doing anything else. If the data directory itself is damaged rather than just needing an upgrade step, stop and restore from the snapshot — repairing InnoDB blind on a production host makes things worse more often than better.

The server never comes back on the network. This is what the console is for. Boot far enough to read the elevate log and the journal, and decide quickly between finishing the upgrade from the console and restoring the snapshot. Set that decision deadline before you start, while you are calm.

When this is the wrong approach

For a large share of hosts, an in-place elevate is the wrong call, and choosing it is a habit rather than a decision.

Decision tree comparing an in-place elevate against rebuilding on AlmaLinux 9 and transferring accounts

Provisioning a fresh AlmaLinux 9 server and moving accounts with WHM’s Transfer Tool is lower risk in most of the ways that matter. You build and test the new box while the old one keeps serving. You move accounts in batches, so downtime is per-account and measured in minutes rather than server-wide and measured in hours. Rollback is a DNS change, not a restore. And you leave behind years of accumulated configuration drift instead of carrying it forward.

The costs are real too: you need a second server for the overlap period, IP addresses change unless you can move them, DNS TTLs need lowering in advance, mail routing needs care during the split-brain window, and any account with hardcoded IPs or unusual custom configuration needs hands-on attention. That is a longer project — but it is a project made of small reversible steps, which is a very different risk profile from one irreversible night.

Choose in place when the box has a large number of accounts, its IPs are hard to move, its configuration is clean, and you have both a snapshot and a console. Choose rebuild-and-transfer when any of those is untrue, when the server carries years of undocumented customisation, or when you cannot get a multi-hour window at all. And if you are also reconsidering the base OS while you are in there, AlmaLinux vs Rocky vs Ubuntu for cPanel is worth reading before you commit — a rebuild is the cheap moment to change that answer, and an in-place elevate is not.

For the current supported source and target versions, and for the exact install command, work from the cpanel/elevate repository and the cPanel documentation rather than from any third-party writeup, this one included.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.