Set the version of PHP to run in some directory

If more than one version of PHP is installed on your system and either CGI or fCGId is used to run PHP scripts in some virtual server, it can be configured to run a different PHP version on a per-directory basis. This is most useful when running PHP applications that only support specific versions.

To set a PHP directory, the --domain flag must be used to specify the directory, --dir to set the path and --version to set the version number.

For example:

virtualmin set-php-directory --domain --dir /home/example/public_html/drupal --version 8.1

Command line help

virtualmin set-php-directory --domain
                             --dir directory|url-path|"."
                             --version num