Help center · Domains and cPanel
How to change the PHP version in cPanel (Select PHP Version)
To change the PHP version in cPanel, open Select PHP Version (the CloudLinux PHP selector) in the Software section, choose the version from the list, click Set as current, and test the site. Before switching, make a backup and check that your theme and plugins are compatible with the new version.
The PHP version affects the speed and the security of the site. Very old versions stop receiving fixes and may not be accepted by current plugins. Very new versions can break a theme or plugin that has not been updated yet.
At MigraCloud, PHP versions from 7.4 onward are available, and the default version is 8.5. Prefer a current version, and use older ones only if an old theme or plugin doesn’t work with the new one yet.
What to check before switching
- Make a backup. If the site breaks, you can go back to the previous state. See how to create and restore a backup with JetBackup.
- Update WordPress, the plugins, and the theme. Outdated versions are the ones that break most often with a newer PHP.
- Check the required version. On the page of each plugin and theme in the WordPress directory, the “Requires PHP” field shows the minimum version. Paid plugins include this in their documentation.
- Choose a quiet time. If the site is a store, avoid switching during peak sales hours.
- Note the current version. You will need it to go back.
How to change the PHP version
- Log in to cPanel.
- In the Software section, open Select PHP Version. If the icon doesn’t appear, search for “PHP” in the cPanel search.
- At the top of the screen, open the Current PHP version list and choose the version.
- Click Set as current.
- Open the site and browse the main pages.
The version applies to the main domain of the account. If your plan allows different versions per domain or subdomain, the option usually appears in the same tool or in the MultiPHP Manager. Check what your cPanel offers.
PHP extensions
On the same screen, the Extensions tab lists the PHP modules (such as mysqli, curl, gd, imagick, zip). Some plugins require an active extension. When you change versions, the checked extensions may change, so confirm that the ones your site uses are still enabled.
PHP options
The Options tab lets you change values such as memory_limit, upload_max_filesize, and max_execution_time. These values fix errors such as the one about a file exceeding the upload limit: see the upload_max_filesize error in WordPress.
After switching
- Open the homepage, an inner page, the WordPress login and, if there is one, the cart and checkout.
- Turn on
WP_DEBUGonly if you need to investigate an error, and turn it off afterward. - Check whether any plugin shows a warning on the WordPress plugins screen.
If the site broke
- Go back to the previous version: Select PHP Version, choose the version you noted, and click Set as current.
- If a white screen or a “critical error” appears, deactivate the plugins one at a time, starting with the oldest, until you find the one that doesn’t work with the new version.
- Update or replace the incompatible plugin or theme, and try again.
Frequently asked questions
Which PHP version should I use?
Use a current version that is still maintained by the PHP team, as long as your theme and plugins support it. The versions offered vary by server: see the list in Select PHP Version.
Does changing the PHP version delete my site?
No. The change only switches the version that runs the site. The files and the database stay as they are. The risk is a plugin or theme that stops working.
Can I have different PHP versions for different sites?
If your plan and tool allow it, yes, per domain or subdomain. Check whether your cPanel shows this option.
The site showed an error after the change. What now?
Go back to the previous version, which is immediate, and then find out which plugin or theme isn’t compatible. Ask for help through the contact page if you need it.
Does changing PHP make the site faster?
Newer PHP versions tend to run code more efficiently, but the gain depends on the site. Caching and lightweight images make a difference too. See what a caching plugin is for.