You might have some scripts that require specific PHP versions. DirectAdmin offers the possibility to install multiple PHP versions and select which version to run for individual sites.
To change the PHP version for a site:
1. Log into your DA account
2. Navigate to Account Manager >> Domain Setup
3. Select the domain you want to change the PHP version for.
4. Click on the top PHP Version Selector link and select the desired PHP version from the list.
5. Click the SAVE button. You will see the confirmation message “PHP versions saved“. The change will be in effect after about 1 minute.
To check the PHP version your site is using you can create a file phpversion.php with the following content and open it in your web browser:
<?php // prints e.g. 'Current PHP version: 8.0.1' echo 'Current PHP version: ' . phpversion() . '<br/>'; ?>
Check out this YouTube clip on how to change the PHP version in DirectAdmin: