PHP Selector is a CloudLinux interface that gives every cPanel account its own set of PHP versions and extensions, isolated from other accounts on the same server. Unlike the classic Apache + mod_php setup, the version can be switched with one click, without touching the web server configuration or waiting for an administrator.
MultiPHP Manager vs PHP Selector
| Tool | Where | Level |
|---|---|---|
| MultiPHP Manager | WHM | Server / account |
| MultiPHP INI Editor | cPanel | Domain |
| PHP Selector (CloudLinux) | cPanel → Select PHP Version | Account |
MultiPHP Manager is configured by the server administrator in WHM, while PHP Selector is available directly from cPanel and only works where the server runs CloudLinux with the alt-php module. If cPanel has no "Select PHP Version" item, the server runs plain Apache/FPM without CloudLinux, and only the administrator assigns the PHP version through MultiPHP Manager.
Typical error after switching versions
The most common problem is a call to a function that no longer exists in the new PHP version. In the error log it looks like this:
PHP Fatal error: Uncaught Error: Call to undefined function create_function()
in /home/user/public_html/wp-content/plugins/old-plugin/init.php:47
The function create_function() was removed in PHP 8.0 — this is not a hosting bug but outdated plugin or theme code. The only fix is to update the plugin to a version compatible with PHP 8.x, or temporarily roll back to PHP 7.4 through the same PHP Selector until the author releases a patch.
The opposite case is downgrading a version, for example when a site moves to an older server or is rolled back manually. Then a typical syntax error appears on constructs the older engine does not understand:
Parse error: syntax error, unexpected token "?", expecting variable (T_VARIABLE)
in /home/user/public_html/inc/helper.php on line 15
This is what happens when the nullsafe operator ?-> (added in PHP 8.0) runs on a PHP 7.4 engine — the only fix here is to restore the newer version through PHP Selector, not to rewrite the code for the old PHP.
Switching PHP through cPanel
- Log in to cPanel → Software → Select PHP Version
- Pick the version you need from the dropdown (for example, 8.2)
- Check the extensions you need in the list on the right
- Click Set as current — the change applies without restarting the server
- Reload the site and check that no 500 errors appeared
Configuring php.ini via .htaccess
# /public_html/.htaccess — overriding PHP directives
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value memory_limit 512M
| Directive | Value | What it controls |
|---|---|---|
| upload_max_filesize | 128M | Maximum size of a single uploaded file |
| post_max_size | 128M | Maximum size of the whole POST request, must be ≥ upload_max_filesize |
| max_execution_time | 300 | Seconds a script may run before being force-stopped |
| memory_limit | 512M | Memory available to a single PHP process |
This method does not always work: if PHP on the server runs as an FPM handler without suPHP/suexec, Apache ignores php_value directives in .htaccess, and the file must be replaced with .user.ini or edited through MultiPHP INI Editor.
Enabling PHP extensions
# cPanel → Select PHP Version → Extensions
# Or via php.ini:
extension=imagick.so
extension=redis.so
extension=mongodb.so
| Extension | Why it is needed |
|---|---|
| imagick | Image processing in WordPress and galleries |
| redis | Object and session cache for heavy CMS and Laravel |
| mongodb | Connecting to a MongoDB database from applications |
| intl | Multilingual support, date and number formatting |
| soap | Integration with legacy SOAP/XML APIs |
When PHP Selector does not fit
- The server runs LiteSpeed without CloudLinux — there will be no "Select PHP Version" item in cPanel at all, only the administrator can change the version
- You need an extension not built for
alt-php— CloudLinux ships a limited package set, exotic .so modules cannot be enabled this way - You need different PHP versions for two subdirectories of the same domain — PHP Selector works at the account/domain level, not a single folder, so you need .user.ini instead
- The server sits on a shared IP with a shared FPM pool — some providers disable self-service version switching for pool stability
Verifying the result
# Over SSH
php -v
# In the browser (create temporarily, then delete)
<?php phpinfo(); ?>
The output of php -v must show exactly the version you picked in PHP Selector — if the version did not change, check whether an old AddHandler for a different PHP version is still left in .htaccess. The list of extensions actually loaded is shown by php -m — compare its output with what is checked in PHP Selector: an extension can be enabled in the interface yet fail to load if the server uses a different PHP-FPM pool for that domain. A detailed breakdown of errors after a version switch is in the article on reading error logs in cPanel, and the versions themselves and their support windows are covered in how to change the PHP version in cPanel.