How to Change Your PHP Version
Change the PHP version of a site and manage PHP extensions with the CloudLinux PHP Selector in the web hosting control panel.
Pick a PHP version that your CMS or app supports. WordPress and most plugins need a current PHP release, and you should avoid versions past end-of-life even if they appear in the list.
Your account can manage PHP in two separate ways, depending on the options enabled for it:
- A PHP version for one domain. Where your account offers it, you choose a specific PHP version in a domain's settings. It applies to that domain and to any subdomains set to use the domain's PHP setting.
- The CloudLinux PHP Selector. For domains set to the PHP option marked (Cloudlinux), the selector chooses the PHP version and turns individual PHP extensions on or off. These settings are shared by every domain in your account that uses the Cloudlinux option. The selector doesn't change domains that use their own PHP version.
Moving a domain from one mode to the other changes how its PHP runs, not just the version number. If your site works today, keep its current setting, and ask support before you switch.
Check what a domain uses
- Log in to the web hosting control panel from your hosting service in the client area.
- Open Hosting Features → Domains → PHP Options. The PHP Version column shows the PHP setting the panel has recorded for each domain. If the labels look inconsistent, or you need to know exactly which PHP your site runs, ask support to confirm.
- To see the choices for a domain, click the pencil icon next to it. The PHP Version list shows the options enabled for that domain. Click Cancel if you were only checking.
Before you change anything
- Write down the domain's current PHP version so you can go back to it.
- Make a backup of the site.
- Check that your CMS, theme and plugins support the version you'll choose.
Make the change outside peak hours: the site may be unavailable or behave differently while the change takes effect. Subdomains that use the domain's PHP setting change with it, so test them too.
Change the PHP version of one domain
If the PHP Version list for the domain offers the version you need:
- In PHP Options, click the pencil icon next to the domain.
- Choose the version from PHP Version and click Save.
- Retest the site, including its admin area, and clear any CMS cache.
If the version you need isn't listed, open a ticket with the domain and the version your app requires. Support will check what's available for your account.
The Default PHP Version section on the same page only sets the PHP used on the command line and preselected for new domains. It doesn't change your existing sites.
PHP Selector: version and extensions
Use the PHP Selector for domains that already use the option marked (Cloudlinux), or after support confirms it's the right mode for your site, for example when your app needs an extension that isn't active.
- Open CloudLinux → Php Selector.
- Choose a version from PHP version and check that Current PHP version shows it.
- Tick the extensions your app needs.
- Reload the page and check that Current PHP version and the extensions you ticked kept your changes. If they didn't, contact support before you continue.
- To change settings such as
memory_limitorupload_max_filesize, click Switch to PHP options. - Retest every site in your account that uses the Cloudlinux option, including their admin areas.
Reset to default puts the selector's extensions back to the server defaults.
To move a domain to this mode, set its PHP Version to the option marked (Cloudlinux) in PHP Options and click Save. Ask support first if the site works today.
If something breaks
Go back to the PHP version you wrote down, or the previous PHP Selector settings, and retest. If the site still fails, open a ticket with the domain, the version you changed from and to, and the error message.
If CloudLinux doesn't appear in your control panel menu, or an extension you need isn't listed, open a ticket with the domain and the module name.
Running a Node.js or Python app instead? See PHP, Node.js and Python on your hosting.