CentOS 7 Is End-of-Life: Moving to AlmaLinux or Rocky on a VPS
Still running a CentOS 7 VPS? Compare a clean move to AlmaLinux or Rocky Linux with an in-place ELevate upgrade, and follow the steps for each.
CentOS 7 reached end of life on 30 June 2024 and no longer gets security updates, so any CentOS 7 VPS still online is running unpatched software. The two practical ways out are moving your sites to a fresh AlmaLinux or Rocky Linux server, or upgrading in place with AlmaLinux’s ELevate tool. A fresh server is safer; ELevate is faster when a rebuild is hard.
This guide is for anyone still running a CentOS 7 VPS, often with cPanel, DirectAdmin or an older PHP stack. It explains both routes, the commands for each, and which version to land on.
Why do you need to move off CentOS 7?
Without updates, every new vulnerability in OpenSSL, the kernel or OpenSSH stays open on your server for good. The CentOS 7 package mirrors have also been retired to the vault, so even installing a package needs workarounds. Newer software such as current PHP versions and control panel releases no longer supports it.
Should you choose AlmaLinux or Rocky Linux?
Both are free, binary-compatible rebuilds of Red Hat Enterprise Linux, so either runs the software you ran on CentOS. Their support dates are almost identical.
| Version | Released | Security updates until |
|---|---|---|
| AlmaLinux 10 | May 2025 | May 2035 |
| AlmaLinux 9 | May 2022 | May 2032 |
| AlmaLinux 8 | March 2021 | May 2029 |
| Rocky Linux 10 | June 2025 | May 2035 |
| Rocky Linux 9 | July 2022 | May 2032 |
| Rocky Linux 8 | May 2021 | May 2029 |
Dates from endoflife.date for AlmaLinux and for Rocky Linux.
Pick AlmaLinux if you want the ELevate in-place route, which AlmaLinux maintains, or if your control panel vendor recommends it. Pick Rocky if your team or vendor already standardises on it. For a new server, choose version 9 for the widest software support today, or version 10 for the longest life.
Option 1: Move to a fresh AlmaLinux or Rocky server (recommended)
A clean server avoids the leftovers of a ten-year-old install and lets you test everything before you switch. It also means downtime only during the final DNS change.
- Order the new server. Pick AlmaLinux 9 or 10, or Rocky Linux 9 or 10, at checkout.
- Rebuild the stack. Install your web server, PHP, database and control panel on the new system. Check that each application supports EL9 or EL10 first.
- Copy the data. Move files with rsync and databases with a dump and restore. Our guide to rsync and database dumps covers the commands.
- Test on the new IP. Use your local hosts file to load each site from the new server before anyone else sees it.
- Switch DNS. Lower the TTL a day before, then point the records at the new IP. Keep the old server for a week as a fallback.
If you use cPanel or Plesk, their own transfer tools can copy accounts across, which saves most of steps 2 and 3.
Option 2: Upgrade in place with ELevate
ELevate uses Red Hat’s Leapp framework to upgrade CentOS 7 to AlmaLinux 8 on the same server. It supports CentOS 7 to Rocky Linux 8 and other EL8 targets too. You then upgrade from 8 to 9 as a second step. Take a full backup first: an in-place major upgrade can fail and leave the server unbootable.
Point CentOS 7 at the vault repositories
Since the mirrors closed, yum cannot install anything until the repo files point at vault.centos.org:
sed -i 's/^mirrorlist/#mirrorlist/g; s|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
yum clean all
yum update -y
reboot
Install ELevate and Leapp
yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
yum install -y leapp-upgrade leapp-data-almalinux
For Rocky Linux 8, install leapp-data-rocky instead of leapp-data-almalinux.
Run the pre-upgrade check and fix what it reports
leapp preupgrade
The first run almost always stops with inhibitors. Read /var/log/leapp/leapp-report.txt. Two fixes appear on most servers:
rmmod pata_acpi
leapp answer --section remove_pam_pkcs11_module_check.confirm=True
Run leapp preupgrade again until no inhibitors remain.
Upgrade and reboot
leapp upgrade
reboot
The reboot runs the actual upgrade and can take a while. Watch it from your VPS console, then confirm the result with cat /etc/redhat-release. The ELevate quickstart guide lists known issues and the steps for the 8 to 9 upgrade.
Fresh server or ELevate: which is right for you?
| Situation | Better route |
|---|---|
| A few websites or apps you can redeploy | Fresh server |
| cPanel or Plesk with many accounts | Fresh server with the panel’s transfer tool, or the panel’s own ELevate script |
| A custom server nobody fully documented | ELevate, after a full backup |
| You need to end up on version 9 or 10 | Fresh server, to skip two upgrade jumps |
Where to run the new server
An AlmaLinux VPS from Cloud VPS Hosts comes with AlmaLinux 8, 9 or 10, or Rocky Linux 8.10, 9.7 or 10.1, chosen at checkout, on KVM with full root access. Plans start at €25 a month for 2 vCores and 4 GB RAM. Cloud Turbo, with 6 vCores and 8 GB RAM, is the safer pick for cPanel or DirectAdmin servers. If your sites need new SSL certificates after the move, you can get one from our SSL certificate store.
Frequently asked questions
Can I still buy a CentOS 7 VPS?
Some hosts still offer the image, but it gets no security fixes. Use AlmaLinux or Rocky Linux instead; they run the same software with current updates.
Is CentOS Stream a replacement for CentOS 7?
CentOS Stream sits just ahead of Red Hat Enterprise Linux rather than following it, so it changes more often. For a server you want to leave alone, AlmaLinux or Rocky is the closer match to what CentOS 7 was.
Will my cPanel licence move to AlmaLinux?
cPanel supports AlmaLinux and Rocky Linux, and its own ELevate script handles CentOS 7 servers. Check your licence terms with your provider before rebuilding, since licences are often tied to an IP.
How long does an ELevate upgrade take?
Plan for an hour or more of downtime on a typical VPS, longer if the pre-upgrade check finds problems. Do it in a quiet period with a backup ready.
Next step: pick the replacement and book the move
Every week on CentOS 7 adds unpatched risk. Choose AlmaLinux or Rocky, set up the new server, and move one site at a time if that feels safer.