AsiaGB › Hosting › PHP Version on DirectAdmin Hosting
How to Choose and Set PHP Version on DirectAdmin Hosting
Updated: November 19, 2026 • Category: Hosting • 8 min read
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.
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:
Security — Older PHP versions that have reached End of Life no longer receive security patches, leaving your site vulnerable.
Speed — PHP 8.x is significantly faster than PHP 7.x, especially for CPU-intensive tasks.
Compatibility — CMS platforms, plugins, and frameworks often specify a minimum required PHP version.
New Features — Newer PHP versions offer language improvements that make development more efficient.
⚠️ 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:
RecommendedPHP 8.3 — Latest version, Active Support until Nov 2026, highest performance
RecommendedPHP 8.2 — Very stable, Active Support until Dec 2025, excellent WordPress/Laravel compatibility
SupportedPHP 8.1 — Security Support until Nov 2025, still reliable
LegacyPHP 8.0 — End of Life, not recommended for production
LegacyPHP 7.4 — End of Life since 2022, security risk
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
Log in to DirectAdmin at yourdomain.com:2222 or the URL provided by AsiaGB.
Go to Extra Features or PHP Selector.
Select the domain you want to change.
Choose your desired PHP version from the dropdown.
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)
WordPress 6.x officially supports PHP 8.0–8.3.
PHP 8.2 is very stable with broad plugin compatibility.
PHP 8.3 is slightly faster, but some plugins may not yet be fully compatible.
Always verify that all your plugins support PHP 8.x before upgrading.
For Laravel (Recommended: PHP 8.2 or 8.3)
Laravel 11+ requires PHP 8.2 as minimum.
Laravel 10 requires PHP 8.1 as minimum.
Use the PHP version that matches your Laravel version requirements.
For Legacy Code or Old Websites
If your code uses functions deprecated in PHP 8.x, you may need to stay on PHP 7.4 temporarily.
Plan to update your code to support PHP 8.x as soon as possible.
Use a PHP Compatibility Checker to identify deprecated functions.
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.
Log in to DirectAdmin → go to PHP Selector.
Select the specific domain (not the main domain) you want to configure.
Choose the desired PHP version.
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
Load your homepage
Test login and registration
Test all forms
Check the admin panel (for WordPress sites)
Test database write operations
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:
Check Error Log in DirectAdmin.
Enable missing extensions in PHP Settings (e.g., mbstring, zip, gd).
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:
Update all plugins to their latest versions.
Check plugin compatibility on WordPress.org.
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:
Check session.gc_maxlifetime in php.ini settings.
Clear sessions from the database or tmp folder.
Ensure there is no output before session_start() in your code.
💡 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:
Use PHP 8.2 or 8.3 for new websites and current WordPress installations.
Always verify plugin and extension compatibility before upgrading.
Test on a staging environment before deploying to production.
Check the Error Log after changing PHP version.
Upgrade from PHP 7.x as soon as possible — it's past its security support date.
If you need help configuring PHP version or troubleshooting post-upgrade issues, contact AsiaGB Support — available 24 hours a day.