Knowledge Base
How to Change PHP Version in DirectAdmin
Switching PHP Versions
Different applications may require different PHP versions. Here's how to change yours.
Changing PHP Version
- Log into DirectAdmin
- Click Domain Setup
- Click on your domain name
- Find the PHP Version Selector option
- Select your desired PHP version
- Click Save
Available PHP Versions
Common versions include:
- PHP 7.4 - Legacy support
- PHP 8.0 - Stable release
- PHP 8.1 - Current stable
- PHP 8.2 - Latest features
Checking Your PHP Version
Create a file called phpinfo.php with:
<?php phpinfo(); ?>
Visit the file in your browser, then delete it when done (security risk).
PHP Requirements by Application
- WordPress 6.x: PHP 7.4+ (8.1 recommended)
- Joomla 4.x: PHP 7.2.5+
- Laravel 10: PHP 8.1+
- Drupal 10: PHP 8.1+
After Changing PHP Version
- Clear your browser cache
- Clear any application caches (WordPress, etc.)
- Test your website functionality