How to update PHP Versions, Modules, and Settings in cPanel

This guide is for our Personal, Business, Premium and Reseller plans, as well as VPS and Dedicated Servers with CloudLinux.
If you're on a WHM/cPanel VPS or Dedicated Server without CloudLinux, click here for a guide on changing PHP settings.

What is PHP and why does it need to be updated or configured?
PHP is a scripting language that is generally used for websites. For web servers to execute the PHP code, they require a PHP interpreter to read and translate the PHP code for the server to understand and execute.
Over time, vulnerabilities are patched up and improvements are made to the PHP code base which requires PHP interpreters to also be updated.
We generally recommend that you keep PHP updated to the latest versions for improved performance and security of your website - follow this link here to find the latest supported versions of PHP.

Are there any risks in changing my PHP version?
Depending on how your website is coded, there is a chance that your website will not work on a different PHP version - newer versions of PHP often remove older functions and/or change how older functions operate to improve performance and security.
We recommend updating the PHP version, one version at a time and testing after every update - if the website loses functionality, then roll back the PHP version and update your website so it will be compatible with the new version.
If you are not confident with updating PHP, we advise getting in contact with your website developer for further assistance.

How can I change the PHP version, module or option on my cPanel account?

Step 1 - Log into cPanel and click on Select PHP Version.


Step 2 - Drop down the menu of PHP versions and select the PHP version that you wish to update to, then click on Set as current.


To enable a PHP module
: Tick the box for the module you want to enable.


To change the PHP options such as max_input_time, post_max_size etc: First, click on the Switch to PHP Options link in the top right.


To edit a PHP setting
, click on the value you want to edit and change it.

If you don't see the PHP setting in this area or if you want a higher setting than this area allows, you can also edit your PHP settings via the .htaccess file.

Thank you for your feedback on this article.