Applications

How to switch PHP version per application

~1 min read

Each application on your server can run a different PHP version. Switch between PHP 7.4 and PHP 8.3 per app without affecting anything else.

Steps

  1. 1

    Open the application

    Open your server, click "Applications", and click the application you want to change.

  2. 2

    Go to Control or Settings

    Click the "Control" tab (or "Settings") inside the application.

  3. 3

    Change the PHP version

    Find the "PHP Version" dropdown and select the version you want (e.g. switch from 8.1 to 8.3).

  4. 4

    Save the change

    Click "Save" or the update button. DeployFly creates a new PHP-FPM pool for this app and reloads Nginx automatically.

  5. 5

    Verify the change

    Create a temporary file at /var/www/yourdomain.com/public/phpinfo.php containing <?php phpinfo(); ?> and visit it. Delete the file after confirming the version.

    <?php phpinfo();

Watch out

  • Some WordPress plugins are not fully compatible with PHP 8.x. Test thoroughly after switching.
  • Check your app's error log after switching PHP versions to catch any compatibility warnings.

Tips

  • Install the new PHP version first from the server's "Install" tab if it doesn't appear in the dropdown.
  • Test a PHP version switch on a staging app before applying it to production.

Related guides