Forge: Multiple PHP Installations

Jul, 7 2020#forge

Today we're pleased to announce that Laravel Forge now supports managing multiple versions of PHP on a single server! This new feature is available to all Forge subscription plans.

Once installed, you may assign a specific PHP version to any site on your server. You may even run different sites on different PHP versions - all within the same server! In addition, you may choose your preferred PHP version when creating new queue workers.

In addition, you may determine which PHP version is the "default" version on the CLI. The default CLI PHP version is the version of PHP that will be executed when running the "php" command on the command line. Other versions may be accessed using their version numbers:

php7.3 script.php

You can also use the new FORGE_PHP and FORGE_PHP_FPM environment variables within your deployment scripts to automatically use the selected default binary and FPM process names:

We have updated the Forge API to reflect the new PHP changes.

For more information, please consult the Forge documentation.

By James Brooks

Engineering Team Lead at Laravel, building Forge, Vapor & Envoyer.

Find me on Twitter, GitHub or my blog.

Follow the RSS Feed.