How to Upgrade PHP Version on Cloudways

Learn how you can upgrade the default version of PHP to PHP 8.x or later.

Cloudways Product avatar
Written by Cloudways Product
Updated this week

Table of Contents

Your new server and new applications are configured to use PHP 8.1 by default. You can always upgrade to the latest version, e.g., PHP 8.2, as per your requirements. Downgrading the PHP version has some limitations, so you can view which PHP versions you can upgrade or downgrade to.

Important Announcement for Older PHP Versions

Cloudways currently supports PHP 7.4, 8.0, 8.1, and 8.2, and all the older versions (5.6, 7.0, 7.1, 7.2, and 7.3) are deprecated as of August 15th, 2022. As a result, new and existing servers with the default PHP version on Cloudways Flexible will not be able to downgrade to older versions; however, existing servers with deprecated versions will continue to work for now.

The deprecated versions will reach the end of life on March 31st, 2024; therefore, you are requested to upgrade to the latest version. Please refer to the Cloudways deprecation process and policy for more details.

Supported PHP Versions

To reiterate, Cloudways currently supports PHP 7.4, 8.0, 8.1, and 8.2, and the older versions (5.6, 7.0, 7.1, 7.2, and 7.3) are deprecated. If you use a PHP version older than PHP 7.4, you can only upgrade to the newer versions, e.g., PHP 7.4, 8.0, 8.1, 8.2. We have explained the same in the following table:

PHP Version

Upgradable to

PHP 5.6

PHP 7.4 and higher

PHP 7.0

PHP 7.4 and higher

PHP 7.1

PHP 7.4 and higher

PHP 7.2

PHP 7.4 and higher

PHP 7.3

PHP 7.4 and higher

PHP 7.4

PHP 8.0 and higher

PHP 8.0

Upgradable to PHP 8.1 and higher

Can be downgraded to PHP 7.4

PHP 8.1

Upgradable to PHP 8.2 and higher

Can be downgraded to PHP 8.0 or lower

PHP 8.2

It is the latest version. It will be upgradeable to any new PHP version once available on the Cloudways Platform.

Can be downgraded to PHP 8.1 or lower

How to Upgrade PHP Version

Here are a few steps that will help you upgrade the PHP version. First of all, please select your platform:

Cloudways Flexible

Prerequisite

Here are the prerequisites for upgrading to the latest PHP versions:

  1. The latest version is PHP 8.2, which requires Debian 10 or higher. It is not compatible with older Debian versions.

  2. Check the compatibility of your application code with the selected version of PHP.

Tip

It is recommended to take a server backup before updating the PHP version, just in case you need to revert to a previous PHP version and restore your application.

Step #1 — Navigate to Server Packages

Log in to your Cloudways Platform using your email address and password.

  1. From the top menu bar, open Servers.

  2. Then, you can choose your desired server.

    Classic Interface

    New Interface

  3. Under Server Management, select Settings & Packages.

  4. Choose the Packages tab.

    Classic Interface

    New Interface

Step #2 — Upgrading PHP Version

  1. Click edit to view the available PHP versions.

    Classic Interface

    New Interface

  2. Select your desired PHP version.

  3. Finally, click Save.

    Classic Interface

    New Interface

  4. You will be prompted to check if your web applications are compatible with your chosen PHP version. If yes, you can click OK to proceed.

    Classic Interface

    New Interface

This may take a few minutes to upgrade the PHP version. Once the PHP version is updated, you will be notified on the same screen. You can also read about the available PHP modules.

Cloudways Autonomous

Prerequisite

We recommend that you check the compatibility of your application code with the selected version of PHP.

Tip
It is recommended to take an application backup before updating the PHP version, just in case you need to revert to a previous PHP version and restore your application.

Step #1 — Navigate to Applications

Log in to your Cloudways Platform using your email address and password.

  1. From the side menu bar, select My Applications.

  2. Then, choose your desired application.

  3. Navigate to Workflow/Tools.

  4. Now, select PHP Settings.

Step #2 — Upgrading PHP Version

  1. Select your desired PHP version from this list.

  2. You will be prompted here to confirm the selection; thus, please click Confirm.

This may take a few minutes to upgrade the PHP version. Once the PHP version is updated, you will be notified on the same screen. You can also read about the available PHP modules.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?