1. bluehost knowledge base

How To Configure The PHP Environment With PHP ini

The version of PHP helps keep your site is secure, running efficiently, and compatible with any plugins. This article explains how to generate a new php.ini file if you are changing PHP versions or made an error with your current php.ini file.  Upgrading your PHP will automatically create the new php.ini file.   

Update PHP Version or Generate new php.ini File

Important note: PHP versions PHP 7.0 and PHP 7.1 are deprecated. We recommend that you update to a supported version of PHP. For more information, read our PHP documentation.

Bluerock

  1. Log in to your Bluehost control panel.
  2. Click the Advanced tab from the side navigation menu to the left.
  3. Under the Software section, click on the MultiPHP Manager icon.
    rock-bluehost-software-multiphp-manager
  4. Select the domain that you want to set up or update from the list.
  5. Select the version of PHP you would like to use at the top right-hand side.
  6. Click the Apply button to finish the update.
 

Legacy

  1. Log in to your Bluehost control panel.
  2. From the home page, scroll down to Programming and click the PHP Config icon.
  3. Choose the version of PHP you will be using.
  4. Choose any extensions you might need for your scripts.
  5. Click the Save Changes button.

 

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

CGI Type

Below are options to consider when selecting the PHP type.
  • Standard PHP (Default)

    By default, all accounts use standard PHP. With standard PHP selected, a PHP script will use the server's master php.ini configuration file if the script's directory does not contain a php.ini file. Each hosting account initially has a copy of the php.ini file in the public_html directory. You may make any changes to this file and the modification will take precedent over the master file. With standard PHP selected in the cPanel, you will need to copy the modified php.ini file into all subdirectories containing PHP files which are to use the custom PHP settings.

    Different folders can have different php.ini files containing different PHP settings. If you need to use different PHP settings for two different scripts, you can place them each in their own folder and with their own php.ini file.

  • PHP Single php.ini

    To avoid copying the same php.ini file to each and every directory containing PHP files, you may select PHP Single php.ini. This option changes the PHP handler defined in ~/public_html/.htaccess to indicate that all subfolders use the same php.ini found in public_html/.

    The .htaccess PHP handler is recursive through all subdirectories unless a subdirectory has a .htaccess file also defining a PHP handler.

  • PHP FastCGI

    Using the PHP FastCGI option makes all your PHP applications run through mod_fcgid instead of mod_suphp. FastCGI uses only one php.ini file located in the public_html directory. Please refer to PHP FastCGI for detailed information about PHP FastCGI including benefits and potential problems.

 

For information about configuring PHP for an addon domain please see PHP Configuration for Addon Domain.