Sometimes you may need to install more than one app that uses different PHP versions, but the PHP Selector will only allow you to choose one PHP version per app. Fortunately, there is a way to resolve this issue.

cPanel:

Simply add the following code to your .htaccess file for the directory you need to have the different PHP version on:

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php71___lsphp
</FilesMatch>

The above code would enable PHP version 7.1 for the directory. You can change "php71" in the above code to the PHP version you need.

For example, if you need PHP version 7.3, you would use "php73".

*Please note, only the available PHP versions found in the PHP Selector in cPanel are supported versions.

You can also enable/disable PHP modules for the version you choose from the PHP Selector. Just choose the PHP version in the PHP Selector and click the modules to enable. 

 

Per directory PHP is not supported on our DirectAdmin plans at this time.

Was this answer helpful? 0 Users Found This Useful (0 Votes)