1. bluehost knowledge base

PHP Version Selection

Overview

Our servers support PHP 7.0 and higher. PHP versions 7.2 and higher offer a significant improvement to speed and memory usage over past PHP versions. It also comes with better error handling and many bug fixes.

Before making the switch, you need to be aware of backward compatibility issues with scripts: Older PHP coding may not be compatible with newer PHP versions. Avoid skipping versions, and instead, make updates incrementally. It is important to check first the compatibility of your site against new versions of PHP before upgrading. Sites built with WordPress can use the PHP Compatibility Checker plugin.

Pro Tip: In addition to making sure you have the latest PHP, make sure your data and files are also protected in the event of accidents, data loss, or hackers with CodeGuard. Ensure you have a daily backup of your site for easy restoration.



The process for updating your version of PHP will depend on what type of account you have set up. Older accounts use the Legacy interface, while updated accounts will use the Bluerock interface.

Most customers should use Bluerock instructions. If you are unsure whether to use Bluerock or Legacy, please see this article Bluerock vs. Legacy. It will show you the difference between the two interfaces.

How to Change Versions Using PHP Config (Legacy) 

You can change your PHP version in Legacy accounts by following these steps:

  1. Log in to your Bluehost account.
  2. Under the Hosting tab, click cpanel in the submenu.
    legacy-cpanel-tab
  3. Scroll down and look for the programming section, then click the PHP Config. 
    Time Zone
  4. Select the version of PHP you're interested in using.
  5. Click Save Change.

Note: This option only works with Legacy Account. Please see below for Rock Instructions.

How to Change Versions Using MultiPHP Manager (Bluerock)

You can change your PHP version in Bluerock accounts by following these steps.
  1. Log in to your Bluehost account.
  2. Click on the Advanced tab from the side navigation menu to the left.
  3. In the SOFTWARE section, click MultiPHP Manager.
    phpinimanager
  4. Check the box next to the website(s) this PHP version will apply to.
  5. Choose the PHP Version, then click Apply.
Please note: If a domain is set to Inherit, it will automatically take on whatever PHP setting is assigned to the main domain.

Generate php.ini

To generate a new php.ini file:

  1. Log in to your Bluehost control panel.
  2. Under the Software sectionclick MultiPHP INI Editor.
  3. Select the path by clicking on the drop-down menu under Selecting a location.
  4. Choose the domain name. 
  5. Once you're done, scroll down and click Apply. 

If you have any further questions about configuring the php.ini file, there are extensive descriptions within the file itself. You may also find more help at http://www.php.net/docs.php.

Things to Keep in Mind

If you are using a custom php.ini file that references PHP modules that are not available in your selected version, your site may not work. Either remove the custom php.ini file (which will cause the server to use the default php.ini file) or create a php.ini file compatible with your selected version.