Related Services:

  1. Linux Shared Hosting

Introduction:

This guide will show you how to change the PHP version for a website hosted on a cPanel server. Changing the PHP version may be necessary for compatibility with certain applications or to take advantage of new features and improvements.

Step 1: Log in to your cPanel account

Log in to your cPanel account using your username and password.

Step 2: Access the MultiPHP Manager

In the "Software" section of your cPanel dashboard, click on the "MultiPHP Manager" icon.

change php version in Cpanel

Step 3: Select your domain

In the MultiPHP Manager, you will see a list of your domains and subdomains. Select the checkbox next to the domain or subdomain for which you want to change the PHP version.

Step 4: Choose the desired PHP version

Use the "PHP Version" dropdown menu located above the list of domains to select the desired PHP version. The available PHP versions will depend on the server configuration and the versions installed by your hosting provider.

Step 5: Apply the new PHP version

Click the "Apply" button to update the PHP version for the selected domain or subdomain. A confirmation message will appear, indicating that the PHP version has been successfully updated.

Step 6: Verify the PHP version change

To verify that the PHP version has been changed, you can create a simple PHP file with the following content:

 
<?php phpinfo(); ?>

 

Save this file as "phpinfo.php" in the root directory of your website (usually public_html) using the File Manager in cPanel. Then, access the file in your web browser by visiting "https://yourdomain.com/phpinfo.php" (replace "yourdomain.com" with your actual domain). The PHP version will be displayed at the top of the page.

Step 7: Remove the PHP info file

For security reasons, it is recommended to delete the "phpinfo.php" file once you have verified the PHP version.

Conclusion:

Changing the PHP version for your website is an easy process using the MultiPHP Manager in cPanel. Make sure to test your website thoroughly after changing the PHP version to ensure that all features and functions are working correctly. If you encounter any issues, you may need to adjust your website's code or revert to the previous PHP version.

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)