Knowledgebase

How to Change PHP Version in cPanel?

To ensure compatibility with different web applications while hosting your websites, the most essential feature is the ability to change the PHP version of your panel. 

cPanel offers users a user-friendly interface for managing various aspects of their web hosting accounts & it also offers a straightforward way to change the PHP version. 

In the detailed article, we will guide you through the process of changing the PHP version in cPanel. Let’s get started!


Also Read: How to Clear the Website Cache in cPanel?


Steps to Change PHP Version in cPanel

1. Log into your cPanel account with your credentials.

logic to cPanel

2. Once you log in, look for the ‘Software’ section in the panel.

look for the ‘Software’ section in the panel

3. In that section, find an option called ‘MultiPHP Manager’ & click on it.

find an option called MultiPHP Manager

4. After clicking, you will see the ‘System default PHP version’ at the top. The system administrator sets the system’s default PHP version. 

The system administrator

5. The ‘Select PHP Version’ interface will show a drop-down menu containing the available PHP versions. You have to select from that menu after selecting the domain. 

Select PHP Version

If you are unsure about the version suitable for your website, consider reviewing the documentation of the web applications running. With that, you have specific PHP version requirements.

Once you select the updated version, click ‘Apply’ to make the changes.

select the updated version and click apply

That’s it; your PHP version got successfully changed. 

To confirm whether changes have occurred, you must follow the instructions below. 

➔ You have to create a simple PHP info file. Just create a new text file & name it ‘info.php’

➔ In that file, add the following code given below:

<?php

phpinfo();

?>

Once done, upload this file to your web server and access it through your web browser (e.g., http://yourdomainname.com/info.php). That page will display complete information about the PHP version running on the server.


Also Read: How to Create a PHPinfo File and View PHP Information?


By following the steps in this guide, you can easily manage your PHP versions & ensure optimal performance along with compatibility for your website.