1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How to Update the PHP Version

How to Update the PHP Version

If you ever encounter problems with the way your server handles PHP packages, it may be helpful to view and/or modify your server's PHP configuration. Depending on the server that you are on, you will have either the MultiPHP Manager or the PHP Selector plugin in the cPanel, which is used to modify your websites' PHP versions.

You can change the PHP version using the MultiPHP tool in cPanel. Take me there.

Option 1 - MultiPHP Manager

You may find some links below that will redirect you to your cPanel and its features provided that the following conditions are met:
  • You are logged into your Customer Portal. You can also log in after clicking the link.
  • The hosting package you are attempting to access is either a Shared or Cloud.

Here are the instructions on how to use the MultiPHP Manager.

  1. Log into cPanel. 
  2. Select MultiPHP Manager in the Software section.
    cPanel MultiPHP Manager Plugin
  3. Select the domain you want to update by checking the box on its left side.
    MultiPHP Manager Select Domain
  4. Choose your preferred PHP version from the drop-down, then click Apply.
    MultiPHP Manager Select PHP Version
  5. There will be a pop-up in the upper right corner notifying you that the change was successful.
    PHP Version Change Successful
If you previously used the PHP Selector to change your PHP version, there may be a handler in your .htaccess file that needs to be removed. Please see How to Fix Error After MultiPHP Update.

To know more about what PHP versions we support, please click here: What Version of PHP Are You Using?
Option 2 - PHP Selector

The PHP Selector allows users on Shared and Reseller servers to easily enable a specific PHP version for a site without manually adding a handler to the .htaccess file. To update the PHP version of a site using the PHP Selector, please check this video guide ⤵.


The steps on how to use the PHP Selector are outlined here:

  1. Log into cPanel.
  2. In the Software section, click the PHP Selector icon.
    cPanel PHP Selector Plugin
  3. Navigate to the directory which you'd like to update the PHP version. The document root for the primary site on your account is located in the public_html folder.
    cPanel PHP Configuration
  4. From the drop-down menu, select the version of PHP you want to use and then click Update.
    cPanel Select PHP Version
    Caution: If your site's scripts rely on older functions of PHP, which are no longer available in the latest stable version being used on the server, you may encounter compatibility issues when the PHP is automatically updated.
Note: When using PHP Selector, updates are applied recursively. This means any update you apply to a directory will also apply to all subdirectories unless you apply a different directive to one of those subdirectories. Therefore, to use a different PHP version for an addon domain, you would need to navigate to the document root for the addon domain and select the appropriate version of PHP.

Getting a "MySQL Extension" Error from MultiPHP Update? Here is a video tutorial on how to fix it:

 

Need a bit more help? Contact HostGator support via phone or Live Chat, and we will be happy to assist you!