RunCloud supports all of the current and active versions of PHP. You can easily switch between different PHP versions on RunCloud without affecting your applications or servers.

We understand that you may have some legacy reasons to use outdated and EOL (end-of-life) versions of PHP, such as PHP 5.6. However, we strongly advise against using them, as they pose a serious security risk for your applications and servers. EOL versions of PHP no longer receive any updates or patches from the PHP developers, which means they are vulnerable to exploits and attacks.

However, if you absolutely need to use an outdated or legacy version of PHP, such as PHP 5.6, you have two options:

  • Use an older OS version that supports the PHP version you want. For example, Ubuntu 16.04 supports PHP 5.6, but it is already EOL (end-of-life) and no longer receives security updates. This option is not recommended for security and performance reasons.
  • Use a containerized server that allows you to run any PHP version on a newer OS version. This option is more secure and flexible, but it requires some extra steps to set up. It provides numerous benefits such as:
    • You can run any PHP version on any RunCloud supported OS version, regardless of their compatibility with the host operating system. For example, you can run PHP 5.6 on Ubuntu 22.
    • You can run multiple PHP versions on the same server without affecting each other.
    • You can easily update, rollback, or switch between different PHP versions without reinstalling them.
    • You can improve the security and performance of your applications by isolating them in containers.

In this article, we will show you how to use a containerized server to run outdated and legacy PHP versions on RunCloud. To learn more about containerization, read our posts on What is a containerized server and Docker FAQs.

Before continuing, make sure you have a containerized server connected to your RunCloud account. For more details on configuring a containerized server, you can refer to our post on How to Set Up a Containerized Server on RunCloud.

Enabling Legacy PHP Versions on RunCloud

Step 1: In your RunCloud dashboard, open the server settings and navigate to the “Services” tab.

Step 2: Locate the service (PHP version) that you want to enable. Click on the “...” button next to it and select “Add to stack“. This will open a pop-up – leave everything to default and click “Add to Stack” once again.

Step 3: The above steps will temporarily save your settings – if you want to deploy, modify, or remove any other services, you can do that now. Once you have made all of the changes, click on “Deploy” to save the changes.

Step 4: After deploying the PHP version, RunCloud take a few minutes to download and install PHP on your server. Once it’s deployed, you will be able to see it in the PHP version drop-down menu while creating a web application.

Note: Using outdated and legacy PHP versions on RunCloud is possible, but not recommended. If you have no choice but to use them, you should use a containerized server instead of an older OS version. This way, you can enjoy the benefits of running legacy PHP applications on an updated OS version without compromising the security and performance of your applications.