Websites

PHP versions

Install PHP 7.4 to 8.5 side by side on a server and choose the version each PHP website runs, without touching its files or settings.

Last updated

A server can run several PHP versions at once, and each PHP website runs one of them through its own PHP-FPM pool. Staff install versions on the server; a website's owner, hosting customers included, picks which one the site uses.

Supported versions

VaultPanel can install PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5. A version the operating system ships comes from its own packages. Any other comes from the repository Ubuntu and Debian users rely on for this, added the first time a version needs it:

SystemRepository
Ubuntuondrej/php on Launchpad
Debianpackages.sury.org

Each version is installed with PHP-FPM, the command line and these extensions: MySQL, cURL, GD, mbstring, XML, ZIP and intl (plus JSON for PHP 7.4).

Install a version

Open the server

Go to Infrastructure > Servers, open the server and choose the Websites tab.

Pick the version

In the PHP versions card, choose a version that is not installed yet and click Install. The agent installs it with apt-get; follow the progress in the operation log.

The card lists the installed versions and the websites running each one. Installing and removing versions needs the websites.manage permission.

Choose a website's version

  • New website: choose the PHP version when you create a PHP site. Only versions installed on the chosen server are offered.
  • Existing website: open the website and use the PHP version card on its Overview tab (or the PHP version field on the Settings tab), then click Switch.

Switching moves the site's PHP-FPM pool to the new version. The site's files and settings stay as they are. If the version a site uses is no longer installed on its server, the card says so and asks you to pick another.

Remove a version

In the PHP versions card, click Remove next to a version you no longer need. The button is unavailable while websites use the version. The agent removes its packages and settings with apt-get, and refuses when:

  • a website still runs on that version (move it to another version first),
  • phpMyAdmin runs on it (see phpMyAdmin),
  • other software on the server needs it.
  • Websites for how PHP-FPM pools are set up per site.
  • App installer for the minimum PHP version of WordPress, Joomla, Drupal and Laravel.