Skip to main content



How to Change PHP Version in cPanel – A Complete Guide

How to Change PHP Version in cPanel: A Step-by-Step Guide

If you manage a website hosted on a cPanel server, knowing how to change PHP version in cPanel is one of the most important technical skills you can have. Whether you are upgrading to a newer version of PHP for improved performance and security, or rolling back to an older version to maintain compatibility with a legacy application, cPanel makes the process relatively straightforward. In this guide, we will walk you through everything you need to know, from understanding why PHP versions matter to completing the change with confidence.

Why Does Your PHP Version Matter?

PHP is the server-side scripting language that powers a vast portion of the web, including popular platforms such as WordPress, Joomla, and Drupal. Each version of PHP brings improvements in speed, security patches, and new features. Running an outdated version of PHP can expose your website to security vulnerabilities, slow down your site’s performance, and even cause compatibility issues with modern plugins and themes.

On the other hand, upgrading too quickly without checking compatibility can break your website if your scripts, plugins, or themes have not yet been updated to support the newer PHP version. This is why it is essential to know how to change PHP version in cPanel so that you can manage these transitions carefully and confidently.

What You Need Before You Begin

Before making any changes to your PHP version, there are a few things you should prepare:

  • Back up your website: Always create a full backup of your files and database before making server-level changes. This ensures you can restore your site if anything goes wrong.
  • Check plugin and theme compatibility: If you are running WordPress or another CMS, verify that your active plugins and themes are compatible with the PHP version you intend to switch to.
  • Access to cPanel: You will need your cPanel login credentials. These are typically provided by your hosting provider.

How to Change PHP Version in cPanel Using MultiPHP Manager

The most common method to change PHP version in cPanel is through the MultiPHP Manager. This tool allows you to set different PHP versions for individual domains on your hosting account, giving you granular control over your server environment.

Step 1: Log In to cPanel

Open your web browser and navigate to your cPanel login page. This is usually found at yourdomain.com/cpanel or yourdomain.com:2083. Enter your username and password to access the control panel dashboard.

Step 2: Locate the MultiPHP Manager

Once you are inside cPanel, look for the Software section. Within this section, you should see the MultiPHP Manager icon. Click on it to open the PHP management tool. If you cannot find it, you can use the search bar at the top of the cPanel dashboard and type “MultiPHP Manager”.

Step 3: Select Your Domain

Inside the MultiPHP Manager, you will see a list of all the domains and subdomains associated with your hosting account. Each domain will display its currently assigned PHP version. Tick the checkbox next to the domain or subdomain for which you want to change the PHP version.

Step 4: Choose Your Desired PHP Version

After selecting your domain, look for the PHP Version dropdown menu at the top of the page. Click on it to see all the available PHP versions that your hosting provider has installed on the server. Common options include PHP 7.4, PHP 8.0, PHP 8.1, PHP 8.2, and PHP 8.3. Select the version that suits your requirements.

Step 5: Apply the Changes

Once you have selected the appropriate PHP version, click the Apply button. cPanel will process the request and apply the new PHP version to your selected domain. This usually takes just a few seconds. You will see a confirmation message once the change has been successfully applied.

How to Change PHP Version in cPanel Using MultiPHP INI Editor

In addition to changing the PHP version itself, you may also want to adjust specific PHP settings for your domain. The MultiPHP INI Editor, also found in the Software section of cPanel, allows you to modify PHP configuration values such as memory limits, upload sizes, and error reporting settings. This tool works in conjunction with the MultiPHP Manager and gives you even greater control over your PHP environment.

Accessing the MultiPHP INI Editor

Navigate to the Software section in cPanel and click on MultiPHP INI Editor. Select the domain you wish to configure from the dropdown menu. You can then switch between Basic Mode, which offers a simplified list of common settings, and Editor Mode, which allows you to manually edit the full PHP configuration file.

Changing PHP Version via .htaccess

In some hosting environments, you may also be able to change the PHP version for a specific directory by editing the .htaccess file. This method is useful if you want to apply a different PHP version to a subdirectory without affecting the rest of your site. To do this, add a line such as the following to your .htaccess file:

AddHandler application/x-httpd-php82 .php

However, this method depends on your hosting provider’s configuration, and it is generally recommended to use the MultiPHP Manager for a more reliable and supported approach.

How to Verify Your PHP Version Has Changed

After making the change, it is good practice to verify that the correct PHP version is now active on your domain. You can do this by creating a simple PHP file containing the following code and uploading it to your website’s root directory:

<?php phpinfo(); ?>

Access this file through your browser, and you will see a detailed page displaying the current PHP version and configuration settings. Remember to delete this file afterwards, as it exposes sensitive server information.

Common Issues When Changing PHP Version in cPanel

Website Displays a White Screen or Errors

If your website shows a blank white screen or throws errors after changing the PHP version, it is likely a compatibility issue with your themes or plugins. Try reverting to the previous PHP version and then check which components need to be updated before attempting the upgrade again.

PHP Version Not Showing in MultiPHP Manager

If the PHP version you need is not listed in the dropdown, it may not be installed on your server. Contact your hosting provider and ask them to install the required PHP version.

Further Reading and Support

Managing your hosting environment effectively goes beyond just changing PHP versions. For more helpful guides on web hosting, domain management, and server configuration, visit the DA Manager Blog, where you will find a wealth of resources to help you get the most out of your hosting setup.

Final Thoughts

Knowing how to change PHP version in cPanel is an essential skill for any website owner or developer. By using the MultiPHP Manager, you can quickly and safely switch between PHP versions, ensuring your website remains secure, fast, and compatible with the latest software. Always remember to back up your site before making any changes, test your website thoroughly after switching versions, and do not hesitate to reach out to your hosting provider if you encounter any issues. With a little preparation and the steps outlined in this guide, managing your PHP version in cPanel should be a smooth and straightforward process.