Update PHP Version on cPanel
- arjun5792
- Aug 30, 2022
- 2 min read

You may have come across a scenario where WordPress asks you to update your PHP version if you run a WordPress website. This is due to the possibility that certain WordPress applications, plugins, or even themes may need a specific PHP version to function properly. Additionally, every new release of PHP includes the most recent security patches, which are essential for enhancing the security of your website. Therefore, it is advised that you update the PHP version on your server. On cPanel, updating the PHP version is simple.
In this article, we'll show you how simple it is and problem-free it is to update the PHP version on cPanel.
How to Update PHP Version on cPanel?
You should think about updating your PHP version right away if you experience issues when working with PHP pages or if you see a message on the WordPress dashboard requesting an upgrade.
The PHP version can be updated in two different ways. To complete the task, use any of the methods.
Option 1: Using MultiPHP Manager
Access your cPanel account.
Under the software category, choose "MultiPHP Manager."
To choose the domain you want to upgrade, check the box on the left.
Select the PHP version, then click "Apply."
If the change you made is successful, a pop-up message will appear. Before performing the update, it is advised to double-check the PHP version you are currently using. By doing this, unneeded problems related to the version update process will be avoided.
Option 2: Applying the PHP Selector
Sign in to the cPanel Account.
Choose "PHP selector" in the software category.
Go to the website's root directory, which for your main site will be called "public html."
There is a drop-down menu here where you can choose the PHP version. Click "update" after selecting the version from the dropdown.
When using PHP as the version update selector, the update will be applied recursively. In other words, if you changed anything in the directory, it would affect all subdirectories as well. To use various PHP versions for an addon domain, you will need to navigate the root document and choose the appropriate version of PHP.
Using the phpinfo.php page, determine the current version.
To determine whether the updates were successful or not, you can create a PHP info page in the root directory. A PHP info page is simple to make. To make it on your own, simply follow the instructions.
Register with your cPanel.
From "Files," choose "File Manager."
Select "public_html" from the resulting list.
From the top right corner, choose "File."
Give your information page a name; for simplicity, call it "phpinfo.php."
Make the "new file" selection.
Right-click phpinfo.php and choose "Edit."
To display installed modules, add the following code to your phpinfo.php file.
<?php
phpinfo(info_modules);
?>
Encrypt changes.
Viewing the phpinfo.php file you produced requires:
Launch a web browser
To the browser tab with your domain name, type the following.
http://example.com/phpinfo.php
You can now see which version of PHP your website is currently running. It will be easier for you to keep track of the PHP version you are currently using if you create the info page before starting the update procedure. You can use this to confirm that the updates were completed successfully. Recheck the entire procedure or ask the provider of the cPanel management service for assistance if you encounter problems after the update.
Comments