Changing the PHP version with CloudLinux in cPanel

A PHP version change can make an application compatible with current dependencies and security updates. It can also reveal code that relied on an older runtime. Treat the change as a small deployment with a recorded starting point and a test plan.

Prepare for the change

Check the application, theme, plugin and encoded-software requirements. Prefer a release still supported by the PHP project. A version remaining visible in a hosting selector does not prove that upstream security support continues; separately supplied extended support has its own scope.

01 Change the setting

  1. In cPanel, search for Select PHP Version and open the CloudLinux tool. It is commonly listed under Software. Select the intended domain if your installation displays a domain selector.
  2. Check the active PHP version and which websites the selector change will affect. cPanel may also offer MultiPHP Manager and MultiPHP INI Editor. These tools manage a different PHP configuration path. Identify whether the domain uses CloudLinux Alt-PHP or a native EasyApache PHP handler before editing.
  3. Record the current version and whether the selector is using native. Note the enabled extensions and options because different PHP versions can have different settings.
  4. Choose a compatible supported version from Current PHP version and use Set as current or the save control shown by your interface. Change only the intended scope.
  5. Recheck required extensions and application limits for the selected version. Do not assume the previous version's extension selections were copied.

Confirm the expected result

Open the application's authenticated system information or health screen and confirm the web PHP version. Test sign-in, page editing, uploads, checkout where used, and scheduled work. An SSH command such as php -v can use a different CLI executable, so it is not sufficient proof of the website runtime.

What should I check if the PHP version change fails?

If the website fails, note the error and time, restore the recorded version while you investigate, and retest. Update incompatible application components in staging before trying again. If the version does not change, investigate the domain handler instead of adding conflicting .htaccess rules.

  • 0 Users Found This Useful
  • cpanel-whm, development
Was this answer helpful?

Related Articles

Changing the PHP upload_max_filesize limit with CloudLinux in cPanel

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The...

Changing the PHP post_max_size limit with CloudLinux in cPanel

post_max_size limits the size of the entire HTTP POST body received by PHP. It includes...

Managing PHP extensions with CloudLinux in cPanel

Extensions add capabilities such as database access, multibyte text handling, image processing...

Configuring allow_url_fopen with CloudLinux in cPanel

allow_url_fopen controls whether PHP file functions can use supported URL wrappers, such as...

Configuring PHP error display and logging with CloudLinux in cPanel

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem...