PHP version per subdomain / folder

While CloudLinux doesn't provide an interface to manage the PHP versions for the subdomains and/or folders, here's what you need to do.

Edit the file .htaccess, generally located at /home/yourDAlogin/domains/domain_or_subdomain/public_html/.htaccess;

Add to the first line of the .htaccess file:

ForceType application/x-httpd-phpversionhere

For example, to set it to load PHP 5.6, you'd place there:

ForceType application/x-httpd-php56

 

---

Enjoy! :-)

 

 

Was this answer helpful?

0 Users Found This Useful