
PHP is the programming language that powers WordPress, WooCommerce, Laravel, and most web applications running on shared hosting today. The version you use directly affects performance, security, and plugin compatibility. DirectAdmin makes it easy to switch PHP versions through a simple dropdown — no terminal commands required.
PHP Settings in DirectAdmin
DirectAdmin provides per-account PHP configuration through the PHP Settings (or PHP Selector) feature. You can find it in the DirectAdmin dashboard under Advanced Features → PHP Settings. From here you can:
- Select the PHP version for your domain
- Enable or disable individual PHP extensions
- Adjust
php.inivalues such as memory limit and upload size
Supported PHP Versions on AsiaGB Hosting
AsiaGB hosting supports the following PHP versions selectable from DirectAdmin:
- PHP 7.4 — legacy support for older plugins and themes that are not yet updated for PHP 8.x
- PHP 8.2 — stable, widely compatible, recommended for most WordPress sites
- PHP 8.3 — the latest stable release with performance improvements and new language features
WordPress Recommendation: WordPress officially recommends PHP 8.2 or higher for best performance and security. If you are running a newer WordPress installation with up-to-date plugins and themes, PHP 8.2 or 8.3 is the right choice. Use PHP 7.4 only if a specific legacy plugin requires it.
How to Change the PHP Version — Step by Step
- Log in to your DirectAdmin control panel.
- Navigate to Advanced Features → PHP Settings.
- Select the domain you want to change (if you have multiple domains on the account).
- In the PHP Version dropdown, select your desired version (e.g., PHP 8.2 or PHP 8.3).
- Click Save.
- The change takes effect immediately — no server restart is needed.
Verify Your PHP Version with phpinfo()
After changing the version, confirm the change worked correctly by creating a test file:
- Using the DirectAdmin File Manager, create a new file in your
public_htmlfolder calledphpinfo.php. - Add this single line of code:
<?php phpinfo(); ?> - Save the file and visit
https://yourdomain.com/phpinfo.phpin your browser. - The page will display detailed PHP configuration info — check the version number at the top of the page.
- Important: Delete
phpinfo.phpafter verifying. Leaving it accessible publicly exposes sensitive server configuration details.
Enable or Disable PHP Extensions
In the PHP Settings screen, below the version selector, you will find a list of available PHP extensions with checkboxes. Common extensions you may need to enable include:
- mysqli / pdo_mysql — required for MySQL database connections (WordPress, most CMS)
- curl — needed by many plugins for API requests and payment gateways
- gd / imagick — for image processing (thumbnails, watermarks)
- mbstring — required for multilingual and Unicode string handling
- zip — needed by WordPress to install plugins and themes via the dashboard
- intl — used by some frameworks and multilingual plugins
Check the box next to the extension name and click Save to activate. Uncheck and Save to disable an extension.
Important php.ini Values to Adjust
The PHP Settings screen also lets you modify key php.ini directives without accessing the server directly. Here are the most commonly adjusted values:
upload_max_filesize
Controls the maximum file size that can be uploaded through a form or the WordPress media uploader. Default is often 2M. For WordPress sites, increase this to 64M or 128M to upload larger images, videos, or plugin zip files.
memory_limit
Sets the maximum amount of RAM a PHP script can use. WordPress recommends at least 256M. WooCommerce stores or sites with many active plugins may benefit from 512M.
max_execution_time
The maximum number of seconds a PHP script is allowed to run before it is terminated. The default is often 30 seconds. If you run long import processes, complex database queries, or large backup operations, increasing this to 120 or 300 can prevent timeout errors.
post_max_size
Sets the maximum size of POST data, which includes file uploads. This value should always be equal to or larger than upload_max_filesize. If you set upload_max_filesize to 128M, set post_max_size to 128M or higher as well.
Legacy Plugin Compatibility: If a plugin or theme explicitly states it requires PHP 7.x and has not been updated, you can set that domain to PHP 7.4 while keeping other domains on the account at PHP 8.2. Each domain's PHP version is independent in DirectAdmin.
Summary
- Find PHP settings under Advanced Features → PHP Settings in DirectAdmin.
- Select PHP 8.2 or 8.3 for modern WordPress sites; PHP 7.4 only for legacy compatibility.
- Verify the change by creating a temporary
phpinfo.phpfile — then delete it. - Enable extensions (curl, gd, mbstring, zip) as needed by your application.
- Adjust
upload_max_filesize,memory_limit, andmax_execution_timeto avoid common errors on WordPress and e-commerce sites.
Flexible Hosting for Every PHP App
AsiaGB hosting supports PHP 7.4, 8.2, and 8.3 — switch versions instantly from DirectAdmin without any downtime.
View Hosting Plans