Guide

Running PHP 5.6 to 8.5 Side by Side: Multiple PHP Versions Per Site Without Forced Upgrades

Updated

On this page
  1. Which PHP versions does Unicorn Panel support?
  2. Why per-site PHP matters
  3. How it works: PHP as a container role
  4. Step by step: changing a site's PHP version
  5. A responsible approach to old PHP
  6. PHP on Alpine and ARM
  7. Beyond PHP: other runtimes
  8. Frequently asked questions
  9. Stop choosing between old sites and new PHP

Every hosting operator eventually meets the site that cannot be upgraded. A WooCommerce store with a custom plugin nobody maintains. A Magento 1 install the client swears they will replace next year. A Drupal site built by an agency that no longer exists. Meanwhile, your newer customers want the latest PHP release for its speed and features.

If your control panel forces one PHP version per server, you end up buying extra servers just to keep old sites alive, or pushing customers into upgrades they are not ready for. Unicorn Panel takes a different approach: twelve PHP versions, chosen per site, on the same server.

Which PHP versions does Unicorn Panel support?

Unicorn Panel supports every major PHP version from 5.6 through 8.5:

BranchVersions available
PHP 55.6
PHP 77.0, 7.1, 7.2, 7.3, 7.4
PHP 88.0, 8.1, 8.2, 8.3, 8.4, 8.5

That is twelve versions in total. Each one is packaged as a swappable Podman role, so you install only the versions you need on each server and change a site's version whenever you like. The websites page and the FAQ confirm that switching does not require rebuilding the site's container.

Why per-site PHP matters

Legacy applications keep working

Older applications often rely on functions, extensions or behavior that later PHP releases removed or changed. Forcing them onto a new version can break checkouts, admin panels or entire sites. With per-site versions, a legacy site stays on the PHP it was built for while it waits for a proper rebuild.

Modern sites get modern performance

Newer PHP releases bring real performance and language improvements. There is no reason a brand-new site should run old PHP just because a neighbor on the same server needs it.

Upgrades happen on your schedule, one site at a time

When you are ready to move a site forward, you change its version, test it, and roll back if something breaks. One site's upgrade never affects another. That turns a risky server-wide PHP upgrade weekend into a series of small, reversible changes.

Migrations stop being blocked by PHP

One of the biggest obstacles to moving hosting panels is discovering that the new platform does not support a site's PHP version. Supporting everything back to 5.6 removes that blocker. It is one reason Unicorn Panel works well as a cPanel alternative for hosts with long-lived customers.

How it works: PHP as a container role

In Unicorn Panel, every site already runs in its own container with its own PHP-FPM pool. PHP versions are delivered as roles you install on a server from the Primary panel. Once a version is installed on a host, any site on that host can use it.

Changing a site's PHP version is a per-site setting. The site keeps its files, its database, its domain and its alias domains; only the runtime underneath changes. Because each site has its own PHP-FPM pool, one site's PHP configuration never leaks into another's. You can also set PHP options for that one site from the panel, without editing a server-wide php.ini.

The same flexibility applies to the web engine. You can run a site on Unicorn's own Sleipnir web server, NGINX, Apache or OpenLiteSpeed, and swap later. Alias domains come with you across an engine swap. Our article on container-per-site hosting explains why this per-site model is so much more flexible than a shared environment.

Step by step: changing a site's PHP version

  1. Install the PHP version on the server. In the Primary panel go to Servers, pick the host, open Roles, and install the PHP version you need. It builds in the background and streams progress live.
  2. Open the site's settings. Choose the website from the Websites list.
  3. Select the new PHP version. Pick it from the per-site PHP setting and save.
  4. Test the site. Check key pages, forms and admin areas. Live logs for PHP and the web server stream from the site's container if you need to debug.
  5. Roll back if needed. If something breaks, switch back to the previous version. Nothing else on the server was touched.

For operators, unicorn php test checks the configuration of every PHP container on a host from the command line.

A responsible approach to old PHP

Supporting old PHP is about giving you time, not encouraging you to stay put forever. PHP 5.6, every 7.x release, and PHP 8.0 and 8.1 no longer receive official security updates from the PHP project, so sites on those versions carry more risk. Check the PHP project's supported-versions page for current dates.

Per-site containers change the risk calculation. A legacy site on old PHP is contained: its own user, its own PHP-FPM pool, its own resource limits, no access to other sites' files. If it is compromised, the damage stays inside that container. Unicorn Shield also blocks common attacks such as WordPress login brute force at the firewall, and fleet-wide malware scanning looks for infected files.

A sensible policy for hosting providers:

  • Put new sites on the newest PHP version your applications support.
  • Allow legacy versions for existing customers, with a clear upgrade conversation.
  • Use per-site isolation so legacy sites cannot endanger modern ones.
  • Test upgrades one site at a time and roll back if needed.

PHP on Alpine and ARM

Unicorn Panel runs on Alpine Linux, and every component, including the PHP roles, ships for both amd64 and arm64. That means the same twelve versions are available whether you run on a traditional x86 VPS, an AWS Graviton instance or a Raspberry Pi. Read more in a free web hosting control panel built for Alpine Linux.

Beyond PHP: other runtimes

The Unicorn Panel homepage also lists Node.js and Python among the technologies the platform orchestrates, alongside PHP. Container packages can be toggled in settings to add extra software to web application containers by default, and site owners can install packages such as ffmpeg inside their own container through the browser terminal.

Frequently asked questions

Can two sites on the same server use different PHP versions? Yes. The PHP version is chosen per site, so neighbors can run anything from 5.6 to 8.5.

Do I have to rebuild a site to change its PHP version? No. Versions are swappable roles, and switching does not require rebuilding the container.

Is PHP 8.5 supported? Yes. PHP 8.5 is the newest of the twelve supported versions.

Are old PHP versions safe to run? They no longer receive official security fixes, so upgrade when you can. Per-site isolation limits the blast radius while you do.

Is this available on the free plan? Yes. Every PHP version and per-site switching are available on the free tier.

Stop choosing between old sites and new PHP

With twelve PHP versions available per site, you never have to buy a server just to keep a legacy site alive, or hold back a modern site for the sake of an old one. Install Unicorn Panel free on two servers:

wget -qO- https://unicornpanel.com/install | sh

Or explore the demo to see per-site PHP selection in the website settings.

Try it on your own servers.

Free for 2 servers and 2 accounts, with unlimited websites, databases, mailboxes and DNS zones.