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.

Guide2 min readLast updated
On this page
  1. Before you switch
  2. Steps
  3. Confirm it took effect
  4. If the site breaks
  5. Subdomains
  6. If it doesn’t work
  7. Common questions

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

Steps

  1. Open Account Manager › Domain Setup.
  2. Select the domain (or subdomain) you want to change.
  3. Find the PHP version setting for that domain.
  4. 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?

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.

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.

Keep going