Newer PHP versions are faster and get security fixes, while older apps may need an older version for a while. On MdmHost, CloudLinux's PHP Selector lets you pick the PHP version for your cPanel account in seconds, without a support ticket.
Before you start
- cPanel access to your account.
- Your application's PHP requirements. Current WordPress works best on PHP 8.2 or 8.3; check plugins and themes too.
- A recent backup, just in case (see backing up WordPress).
Change the PHP version
- Log in to cPanel.
- Go to cPanel → Software → Select PHP Version.
- At the top you see Current PHP version. Open the drop-down and choose the version you want.
- The page shows the extensions for that version. Your saved extension choices for the version load automatically.
- The change is applied immediately; there is no separate Save button for the version on most versions of the tool. If you see Set as current, click it.
Note: native is the server's default PHP, managed outside the selector. Choose a numbered version (such as 8.2) to use the selector's extensions and options.
Test the site
- Open your site in a private window and click through key pages, forms and checkout.
- Log in to the admin area and check for warnings.
- Look at cPanel → Metrics → Errors for new PHP errors.
If something breaks
- Switch back to the previous version in Select PHP Version; it takes effect immediately.
- Update the plugin, theme or script that failed, then try the newer version again.
- Check that required extensions are enabled for the new version, such as
mysqli,intl,imagickorioncube_loader(see enabling extensions and options).
Common errors after a PHP upgrade
| Error | Likely cause |
|---|---|
| Call to undefined function mysql_connect() | Very old code; needs updating, mysql_* was removed in PHP 7. |
| Site requires the ionCube PHP Loader | Enable ioncube_loader for the new version. |
| White screen or 500 error | A plugin is incompatible. Enable debug mode (see WordPress debug mode). |
| Deprecated warnings shown on the page | Turn off display_errors in Options and update the code. |
PHP Selector and MultiPHP
cPanel also has MultiPHP Manager. On CloudLinux servers, the PHP Selector usually controls the version for the account. The difference is explained in PHP Selector vs MultiPHP Manager.
Frequently asked questions
Can I use different PHP versions for different domains?
PHP Selector sets one version for the whole account. If you need different versions per domain, use MultiPHP Manager where available, or host the site in a separate account.
Which PHP version is fastest?
Newer versions are generally faster. PHP 8.2 and 8.3 are good choices for current WordPress, WooCommerce and Laravel sites.
Does changing PHP version delete my settings?
No. Extensions and options are saved per version, so switching back restores your earlier choices.
Will a PHP upgrade make my site faster?
Usually yes. Each major PHP release has improved performance, and PHP 8.x is markedly faster than 7.x for WordPress. Combined with LiteSpeed Cache, it is one of the cheapest speed-ups available.
Why is an old version still in the list?
CloudLinux keeps old versions for legacy apps. They no longer get security fixes, so use them only while you update the application.
