Skip to main content

Enable Multiple Versions of PHP on an InterWorx Server

Naturally, you can use the version of PHP that ships with your operating system if you wish, but many popular PHP scripts now require newer versions of PHP and won't work with PHP 5.3 or 5.4. However, if you were to update your main version of PHP to 7.3 you may run into issues where some scripts may only work with PHP 7.1 or 7.2. So what can you do? You can install multiple versions of PHP and let each user account use whatever version of PHP they need. Thankfully InterWorx makes it easy to offer exactly that!

To convert your server to use multiple versions of PHP, log into NodeWorx as an administrative user and then follow these steps:

  1. Navigate to the Web Server item, which can be found under the System Services section of the sidebar.

  2. Scroll down to Multiple PHP Versions. Click on the Enable button in that area to activate this feature.
    To use Multiple Versions of PHP, Click Enable in the Multiple PHP
Versions Section of the Web Server Area in
NodeWorx

  3. When the process is complete, a number of new settings will appear in this area.
    Check the Box Next to the Versions of PHP you want to Enable and
click Update to Install
Them.

    1. Now you can click the checkboxes next to each version of PHP you want to offer to users on this server. You can also  click the check all or check none buttons to quickly select or deselect all versions of PHP.

    2. Once you've chosen the versions of PHP you want to offer, click the Update button and InterWorx will start the installation in the background. During this time a spinning indeterminate progress indicator will appear next to the Update button.

    ⚠️ You shouldn't try to do anything else on this page until the installation process is complete. It will take some time, especially if you choose to install all available versions of PHP.

  4. Now you need to select the default version of PHP. You can change the default version at any time, by selecting one from the Default PHP Version drop-down list and then clicking the Update button.

⚠️ If you already have accounts on your server, you should now adjust their packages to add access to multiple versions of PHP if that is what you want.  If you don't adjust the packages, all existing accounts will continue to have access only to the one version of PHP that you've set as the default.