Loading...

Knowledge Base

How Do I Update the PHP Version on My Site

Suppose you ever encounter problems with how your server handles PHP packages or find WordPress requesting that you upgrade your PHP version. In that case, knowing how to view and modify your server's PHP is helpful. Updating your site's PHP version is vital for its security. The latest security patches will be implemented whenever a new PHP version is released. This article discusses a few options for upgrading the PHP version of your hosting account.

How to update a Website's PHP Version

Follow the instructions below to update the PHP version of your website.

Via the Customer Portal

  1. Log in to your Customer Portal.
  2. Go to Websites from the left navigation menu.
  3. Click Manage Site next to the website you want to manage.

    Edit Site button
     

  1. Click the Advanced tab.
  2. Find the PHP Version section and click the Change PHP Version button.

    Settings tab - PHP Version - Change PHP Version
     

  3. Select the PHP version from the dropdown.

    Settings tab - PHP Version - Select PHP Version
     

  4. Click Apply.
  5. A notification will pop up, notifying you about the successful change of the PHP version.

    PHP Version Change Successful
     

Via cPanel's MultiPHP Manager

  1. Log in to cPanel.
  2. Within cPanel, click MultiPHP Manager under the Software section.

    cPanel - MultiPHP Manager
     

  3. Select the domain you want to manage.

    MultiPHP Manager - Select domain
     

  4. Select the PHP version from the dropdown, then click Apply.

    MultiPHP Manager - Select PHP version
     

  5. A notification will pop up, notifying you that the change was successful.

    PHP Version Change Successful
     

We have created a video guide to walk you through the steps.

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, similar to this one:
      
    Use PHPedge as default  
    AddHandler application/x-httpd-php-edge .php  
    <IfModule mod_suphp.c>  
        suPHP_ConfigPath /opt/phpedge/lib  
    </IfModule>
    

For specific instructions on fixing Missing MySQL Extension errors, please refer to our support article How to Fix Error After MultiPHP Update.

Need further assistance? Please contact HostGator Support via phone or chat, and we will be happy to assist you!

Loading...