Can I use a different PHP version per directory or subdomain?
No. On our servers, one PHP version applies to your entire hosting package: for all domains, subdomains, and folders within it. You choose that version in DirectAdmin under Select PHP version.
A line in .htaccess to give one folder a different version, like SetHandler application/x-lsphp81, doesn't work on our servers. So don't use it. If such a line is still in an .htaccess file, remove it.
What can you do instead?
- Choose the newest PHP version that all your websites in the package work with.
- Does one website really need to run on a different version than the rest? Then put that website in a separate hosting package.
- Does an old website only work on an old PHP version? Have it updated, by your web builder or by us: see Having a PHP upgrade done.
Detailed explanation with screenshots: Selecting the PHP version (Select PHP version) in the DirectAdmin manual.
