How to Change PHP Version in DirectAdmin

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:

Supported PHP Versions on AsiaGB Hosting

AsiaGB hosting supports the following PHP versions selectable from DirectAdmin:

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

  1. Log in to your DirectAdmin control panel.
  2. Navigate to Advanced Features → PHP Settings.
  3. Select the domain you want to change (if you have multiple domains on the account).
  4. In the PHP Version dropdown, select your desired version (e.g., PHP 8.2 or PHP 8.3).
  5. Click Save.
  6. 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:

  1. Using the DirectAdmin File Manager, create a new file in your public_html folder called phpinfo.php.
  2. Add this single line of code: <?php phpinfo(); ?>
  3. Save the file and visit https://yourdomain.com/phpinfo.php in your browser.
  4. The page will display detailed PHP configuration info — check the version number at the top of the page.
  5. Important: Delete phpinfo.php after verifying. Leaving it accessible publicly exposes sensitive server configuration details.
PHP Settings page for configuring PHP options
PHP Settings page for configuring PHP options
Select PHP version from the dropdown (circled) then click Save
Select PHP version from the dropdown (circled) then click Save

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:

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

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