Change the PHP version

更新时间:
复制 MD 格式

You can change the PHP version for Web Hosting instances that run a Linux operating system. If the PHP version on your host is outdated or does not meet your website's requirements, your website may not function correctly. To resolve this, change the PHP version on your Web Hosting instance.

Limitations

On Web Hosting instances that run a Linux operating system, the supported PHP versions depend on the host type.

  • Advanced Web Hosting instances support the following PHP versions:

    Host type

    Supported PHP versions

    Exclusive Advanced host

    PHP 5.3/5.4/5.5/5.6/7.0/7.1/7.2/7.4/8.0/8.2/8.4

    Shared Economy Advanced Edition

    PHP 5.3/5.4/5.5/5.6/7.0/7.1/7.2/8.0/8.2/8.4

  • Non-Advanced Web Hosting instances support the following PHP versions:

    Host type

    Supported PHP versions

    Exclusive Non-Advanced host

    PHP 5.2/5.3/5.4/5.5/5.6/7.0/7.1/7.2/8.0/8.2/8.4

    Shared Economy Edition

    PHP 4.3/5.2/5.3/5.4/5.5/8.0/8.2/8.4

    Note

    Check the Web Hosting console for the specific versions available for your instance.

Procedure

  1. Log on to the Cloud Web Hosting management page.
  2. Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
  3. In the navigation pane on the left, choose Advanced Environment Settings > PHP Version Settings.
  4. On the PHP Version Settings page, select a PHP version and click save settings.

    For example, on an Exclusive Advanced host, available PHP versions range from 5.3 to 8.4. If you set the PHP version to 5.3 or later, you must set the database encryption mode to 41-bit encryption when you reset the database password.

    Important

    Changing the PHP version automatically triggers a reconfiguration of your website. Please wait for this process to complete.

  5. In the Prompt dialog box that appears, click Confirm.

    The version change takes approximately 5 minutes to take effect, during which your website continues to run on the previous PHP version.