How to Choose and Set PHP Version on DirectAdmin Hosting

Updated: November 19, 2026 • Category: Hosting • 8 min read

PHP Version on DirectAdmin Hosting

PHP powers over 77% of websites on the internet, including WordPress, Joomla, Laravel, and many other platforms. Choosing the right PHP version on DirectAdmin Hosting directly affects your website's speed, security, and software compatibility.

This guide explains PHP version differences, how to check and change your PHP version on DirectAdmin, and how to troubleshoot common issues after upgrading.

What Is a PHP Version and Why Does It Matter?

PHP (Hypertext Preprocessor) is a server-side scripting language that processes commands on the server and returns HTML to the browser. Each PHP version differs in performance, new features, and backward compatibility.

Reasons to care about your PHP version:

⚠️ Important PHP 7.4 and 8.0 have both reached End of Life and no longer receive security updates. If you are still using them, upgrade as soon as possible.

PHP Versions Available on AsiaGB Hosting

AsiaGB Hosting supports multiple PHP versions through the DirectAdmin PHP Selector, allowing you to choose the best version for each website:

PHP Version Comparison

Comparing the main PHP versions used on hosting:

PHP Version Released Support Status Best For WordPress Min
PHP 8.3 Nov 2023 Active (until Nov 2026) New sites, Laravel 10+ WP 6.0+
PHP 8.2 Dec 2022 Active (until Dec 2025) WordPress, Drupal, Symfony WP 5.9+
PHP 8.1 Nov 2021 Security (until Nov 2025) Sites not ready to upgrade WP 5.6+
PHP 8.0 Nov 2020 End of Life Not recommended WP 5.6+
PHP 7.4 Nov 2019 End of Life Legacy only WP 5.3+

PHP 8.x vs 7.x Performance

PHP 8.x includes a JIT (Just-In-Time) Compiler that accelerates computation-heavy tasks. In real-world WordPress benchmarks, PHP 8.2/8.3 is typically 20–30% faster than PHP 7.4, improving Time to First Byte (TTFB) and consequently Core Web Vitals and SEO rankings.

How to Change PHP Version on DirectAdmin

AsiaGB Hosting uses DirectAdmin, which offers two methods to change your PHP version:

Method 1: Via PHP Selector in DirectAdmin

  1. Log in to DirectAdmin at yourdomain.com:2222 or the URL provided by AsiaGB.
  2. Go to Extra Features or PHP Selector.
  3. Select the domain you want to change.
  4. Choose your desired PHP version from the dropdown.
  5. Click Save and wait for the system to apply the change.
✅ Tip Depending on your DirectAdmin theme, PHP Selector may appear under Advanced Features or Domain Setup.

Method 2: Via .htaccess File

You can specify a PHP version for a specific directory by adding this to your .htaccess file:

# Use PHP 8.2
AddHandler application/x-httpd-php82 .php

# Or for PHP 8.3
AddHandler application/x-httpd-php83 .php
⚠️ Note The .htaccess method may not be supported on all server configurations. Use the DirectAdmin PHP Selector as the primary method, or contact AsiaGB Support to confirm compatibility.

How to Choose the Right PHP Version

For WordPress (Recommended: PHP 8.2 or 8.3)

For Laravel (Recommended: PHP 8.2 or 8.3)

For Legacy Code or Old Websites

Setting PHP Version Per Domain

DirectAdmin supports setting a different PHP version for each domain on your hosting account. This is especially useful when you have multiple websites with different requirements — for example, one legacy site still needing PHP 7.4 while a new site runs on PHP 8.2.

  1. Log in to DirectAdmin → go to PHP Selector.
  2. Select the specific domain (not the main domain) you want to configure.
  3. Choose the desired PHP version.
  4. Repeat for each domain that needs a different version.
ℹ️ DirectAdmin Advantage With DirectAdmin's per-domain PHP Selector, you can manage each site's PHP version independently without needing a separate VPS or server.

Testing After Changing PHP Version

1. Verify the PHP Version in Use

Create a file named phpinfo.php in your web root:

<?php phpinfo(); ?>

Open it in your browser at yourdomain.com/phpinfo.php to see the current PHP version. Delete this file immediately after checking — it exposes server configuration details.

2. Check the Error Log

In DirectAdmin, go to Error Log to see if any PHP errors appeared after the version change.

3. Test Core Website Functions

4. Check Performance

Use tools like GTmetrix or Google PageSpeed Insights to measure page load speed before and after the PHP version change to confirm the improvement.

Troubleshooting Common Issues

Issue: Blank Page or 500 Error

Cause: A required PHP extension is not enabled, or your code uses functions removed in the new PHP version.

Fix:

  1. Check Error Log in DirectAdmin.
  2. Enable missing extensions in PHP Settings (e.g., mbstring, zip, gd).
  3. For WordPress: temporarily deactivate all plugins, then reactivate them one by one.

Issue: WordPress Plugin Malfunctioning

Cause: The plugin has not been updated to support the new PHP version.

Fix:

  1. Update all plugins to their latest versions.
  2. Check plugin compatibility on WordPress.org.
  3. If a plugin doesn't support PHP 8.x, find an alternative that does.

Issue: Session or Cookie Errors

Cause: PHP 8.x has stricter session handling.

Fix:

💡 Pro Tip Always test PHP version upgrades on a staging site before applying them to production to prevent disruption to real users.

Frequently Asked Questions

Which PHP version is best for WordPress in 2026?

PHP 8.2 or 8.3 is recommended for WordPress in 2026. Both fully support WordPress 6.x, are 20–30% faster than PHP 7.4, and still receive security updates.

What should I do if my website breaks after changing PHP version?

Revert to the previous PHP version immediately via DirectAdmin PHP Selector. Then check the Error Log to find the cause. Most issues stem from plugins or extensions that don't yet support the newer PHP version.

Is PHP 7.4 still usable in 2026?

PHP 7.4 reached End of Life in 2022 and no longer receives security patches. Some hosts still provide it, but it is not recommended for production. Upgrade to PHP 8.1 or higher as soon as possible.

Can different domains on DirectAdmin use different PHP versions?

Yes. DirectAdmin supports per-domain PHP version selection via the PHP Selector, so you can run a legacy site on PHP 7.4 while running a new site on PHP 8.3 on the same hosting account.

How do I check which PHP version my website is running?

Create a file named phpinfo.php containing <?php phpinfo(); ?> and open it in your browser. It will show the active PHP version. Delete this file immediately after checking.

What is the difference between PHP 8.3 and 8.2?

PHP 8.3 adds typed class constants, improved json_validate(), and various performance improvements and bug fixes over 8.2. If your application supports it, upgrading is recommended, but always test on staging first.

Conclusion

Choosing the right PHP version on DirectAdmin Hosting is essential for the security, performance, and compatibility of your website:

If you need help configuring PHP version or troubleshooting post-upgrade issues, contact AsiaGB Support — available 24 hours a day.