Skip to main content
The safest way off CentOS is to build a new AlmaLinux or Rocky Linux server alongside the old one, copy and test your application there, then switch DNS. If anything goes wrong, you switch DNS back. CentOS Linux 8 reached end of life in December 2021 and CentOS 7 in June 2024, so neither receives security updates.

Step 1: Choose your target OS

For Red Hat Enterprise Linux (RHEL) compatibility, the two common choices are AlmaLinux and Rocky Linux. Both are free, community-governed rebuilds:
  • AlmaLinux: run by the non-profit AlmaLinux OS Foundation, with CloudLinux as a major sponsor. Since 2023 it targets application binary interface (ABI) compatibility with RHEL rather than an exact bug-for-bug copy. Supported by cPanel and CyberPanel.
  • Rocky Linux: run by the Rocky Enterprise Software Foundation (RESF), founded by CentOS co-founder Gregory Kurtzer, with CIQ as a major sponsor. It aims to stay as close to RHEL as possible. Also supported by cPanel.
For the governance and release differences, see AlmaLinux vs. Rocky Linux.

Step 2: Take an inventory

Before you touch anything, record what the current server runs:
  1. Packages: rpm -qa | sort > packages.txt
  2. Repositories: list third-party repos such as EPEL or Remi: ls /etc/yum.repos.d/
  3. Application stack: the exact PHP, database and web server versions your application needs.
  4. Services and schedules: systemctl list-unit-files --state=enabled and every user’s crontab -l.

Step 3: Deploy a test server

Don’t upgrade your production server in place first. Build a new one next to it:
  1. Deploy a new FlashRDP Linux VPS. Login details are emailed on average in under 3 minutes.
  2. Choose AlmaLinux or Rocky Linux (9 or 10) from the available distributions.
  3. Harden it before moving any data: SSH keys, a firewall (firewalld), and updates (dnf upgrade).

Step 4: Rehearse the migration

  1. Copy files: use rsync to copy your web root, configuration and database dumps from the CentOS server to the new one:
  2. Restore SELinux contexts: AlmaLinux and Rocky Linux enforce SELinux by default. Relabel copied files instead of turning SELinux off:
  3. Test locally: edit the hosts file on your own computer to point your domain at the new server’s IP.
  4. Validate: test the application end to end and watch the web server and application error logs.

Step 5: Cut over, with a rollback plan

  1. Lower the TTL: 48 hours before, set your DNS TTL to 300 seconds (5 minutes).
  2. Maintenance mode: put the live application into maintenance mode.
  3. Final sync: run rsync again and import a fresh database dump.
  4. Update DNS: point your A records to the new server.

Rollback

Because the old server is untouched, rolling back means pointing DNS back to it. Keep it until the new server has run cleanly for long enough that you’re confident, then cancel it.

AlmaLinux vs. Rocky Linux

Available Distributions

AlmaLinux VPS

Rocky Linux VPS

Last modified on October 16, 2026