DirectAdmin is one of the several control panels that allow using multiple PHP versions. In that way, you can support website software on the same server that requires different PHP versions.
In this guide we will install these PHP versions: primary 8.3, secondary 8.2, optional 8.1. You can replace PHP versions if you want.
0. Preliminary requirements
DirectAdmin installed on your server. You can install it by following our guide.
1. Enable Multi-PHP with PHP-FPM
Connect to your server via SSH as root.
Then, run these commands (to install different versions, just replace numbers with the desired versions):
cd /usr/local/directadmin
da build set php1_mode php-fpm
da build set php1_release 8.3
da build set php2_release 8.2
da build set php3_release 8.1
da build php
da build rewrite_confs
This will take some time. Once the command completes, proceed to the next step.
2. Select PHP per domain
Make sure to log in at the user level, not as admin.
In the left sidebar select "Account Manager" and click "Domain Setup":
You will be presented with a list of your domains. Click on the desired domain.
Then, click on "PHP Version Selector":
You will see dropdown menu where you can choose PHP version for your domain:
That's it! You can now select different PHP versions for your domain in DirectAdmin.
For more information about multiple PHP versions, you can refer to official documentation.



