Ultra Web Hosting Docs

PHP Selector

The CloudLinux PHP Selector lets you choose which version of PHP your site runs, enable or disable PHP extensions, and adjust php.ini settings — all from within cPanel.

Changing Your PHP Version

  1. Log into cPanel.
  2. Scroll to the Software section.
  3. Click Select PHP Version.
  4. Use the dropdown at the top of the page to choose the PHP version you want (e.g., 8.1, 8.2, 8.3).
  5. Click Set as current to apply the change.
Note The PHP version change takes effect immediately. If your site shows errors after switching, it may be using functions that are deprecated or removed in the new version. You can switch back at any time.

Enabling and Disabling PHP Extensions

PHP extensions add extra functionality to PHP, such as database drivers, image processing libraries, and encryption tools. You can toggle individual extensions on or off.

  1. Go to Select PHP Version in cPanel.
  2. Make sure you have the correct PHP version selected at the top.
  3. Below the version selector, you'll see a list of available extensions with checkboxes.
  4. Check the box next to any extension you want to enable, or uncheck it to disable.
  5. Click Save to apply your changes.

Commonly needed extensions include:

Warning Disabling an extension that your site depends on will cause errors. If you're not sure which extensions your application needs, check its documentation before making changes.

Adjusting php.ini Values

You can adjust PHP configuration values like memory limits, upload sizes, and execution times directly from the PHP Selector.

  1. Go to Select PHP Version in cPanel.
  2. Click the Options tab (or link) near the top of the page.
  3. Locate the setting you want to change and enter the new value.
  4. Click Save to apply.

Common settings you may need to adjust:

Tip If the PHP Selector's Options page doesn't have the setting you need, you can also create a custom php.ini or .user.ini file in your site's document root (usually public_html). Settings defined there override the defaults for that directory.

PHP Version Per Domain

If you host multiple domains on your account, the PHP version set through the PHP Selector applies to all domains by default. To use a different PHP version for a specific domain, you can add the following to the .htaccess file in that domain's document root:

<IfModule mime_module>
  AddHandler application/x-httpd-alt-php82___lsphp .php
</IfModule>

Replace php82 with the version you want (e.g., php81 for PHP 8.1, php83 for PHP 8.3). The exact handler name may vary — contact support if you need help setting this up for a specific domain.