How to change the PHP version in DirectAdmin
Switch a domain or subdomain to a different PHP version in DirectAdmin, test the result and roll back instantly if something breaks.
On this page
Each domain on your account can run its own PHP version. Available versions: PHP 7.4, 8.0, 8.1, 8.2, 8.3 and 8.4.
Before you switch
- Update your application, themes and plugins first.
- Take a backup. How to create and download a full account backup
Steps
- Open Account Manager › Domain Setup.
- Select the domain (or subdomain) you want to change.
- Find the PHP version setting for that domain.
- Choose the version and save.
The change applies within moments. Visit the site in a private window and test the important pages.
Confirm it took effect
Check with a PHP info file or WordPress Site Health. How to check which PHP version your site is using
If the site breaks
Switch back to the previous version — it’s immediate — then look at the error log to find which part of the site isn’t compatible. How to find PHP errors (error logs and display_errors)
Subdomains
Subdomains can use a different version from the main domain, which is useful for testing an upgrade on a staging copy first. Using a subdomain as a staging site
Note: If you don’t see a PHP version option on the domain’s page, search for “PHP” in the DirectAdmin search box.
Prefer to follow along?
- Upgrade your site to a newer PHP version safely
Intermediate · 30 min - Deploy a Laravel application to Traxio
Advanced · 60 min - Diagnose a 500 Internal Server Error
Intermediate · 20 min
Not with Traxio yet? You can try this on a real server with our PHP hosting: £0.99 a month.
If it doesn’t work
These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.
- 500 Internal Server Error: how to fix itFind the real cause of a 500 error: read the error log, then check .htaccess, PHP errors, permissions and PHP version in order.
- Understanding PHP error messagesHow to read a PHP error: fatal errors, parse errors, warnings, notices and deprecations, what each means for your site, and where to look next.
- Blank white page: how to find the hidden errorA completely blank page usually means a PHP error that isn’t displayed. How to reveal it with logs and fix the cause.
Common questions
How do I change my PHP version?
In DirectAdmin, open the PHP version selector for your domain and pick the version you want. The change applies straight away, and switching back is just as quick if something breaks.
Before upgrading a live site, check that your CMS, theme and plugins support the new version. For WordPress, update everything first, then change PHP — that order avoids most problems.
Spotted something out of date or unclear? Tell us and we’ll fix it.