If you are using assistive technology and are unable to read any part of the HostMonster website, or otherwise have difficulties using the HostMonster website, please call 866-573-HOST and our customer service team will assist you.
Skip to main content

HostMonster Web Hosting Help

How To Configure The PHP Environment With PHP ini



Overview

The version of PHP helps keep your site secured, running efficiently, and compatible with any plugins. This article explains how to generate a new php.ini file if you are into changing the PHP version 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.

Please note: We will be updating to PHP version 8.0 in batches beginning in 2022. Keep an eye out for communications on when your account will be updated and what changes, if any, you will need to make. For more information on updating content for PHP compatibility, read our guide on What to do if your Site Does not Work with Newer Versions of PHP. To learn more about what is changing with PHP 8.0, please see PHP.net's release notes.

Rock

  1. Log in to your hostmonster 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.
  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 hostmonster control panel.
  2. Click the cpanel sub-tab from the navigation menu that stretches across the top of your screen.
  3. Locate the PHP Config tool under the programming category.
  4. Select the domain that you want to set up or update.
  5. Choose the version of PHP you will be using.
  6. Choose any extensions you might need for your scripts.
  7. 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.

Note: The Advanced tab will load your cPanel. Legacy accounts will feature a horizontal navigation bar at the top of the screen, while Rock account users will see a vertical navigation menu on the left-hand side of the screen.

CGI Type

Below are options to consider when selecting the PHP type.

Standard PHP (Default)

By default, all accounts use standard PHP. A PHP script will use the server's master php.ini configuration file with standard PHP selected 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 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 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 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.

Pro Tip: For information about configuring PHP for an addon domain, please see PHP Configuration for Addon Domain.

Knowledgebase Article 740,788 views bookmark tags: configuration ini php server


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

How to edit PHP Configuration --- VPS or Dedicated
Knowledgebase Article 127,842 views tags: dedicated php root vps whm

How do I configure Dreamweaver MX for PHP and MySQL?
Knowledgebase Article 141,814 views tags: php

How can I adjust the php settings specifically for an Addon Domain?
Knowledgebase Article 265,037 views tags: domain php

Related Help Content

How to change your PHP version in your hosting account
Knowledgebase Article 797,452 views tags: config php selection version

What can I do to increase my Site Security while hosting with HostMonster?
Knowledgebase Article 355,269 views tags: antivirus basic hacked keyloggers malware php security site

This article will explain how to add a PHP handler to your .htaccess files. This is useful if you want to customize the version of PHP that runs your PHP files.
Knowledgebase Article 339,542 views tags: htaccess php

Changing PHP versions, load custom Apache mods, and other Apache/PHP customizations
Knowledgebase Article 125,443 views tags: easyapache php vps whm

Many popular website platforms use PHP for rendering their content. It’s common for these sites to have automatic update tools to ensure that they work with the latest version of PHP, however sometimes a theme or plugin for these services may prevent them from updating or may not work with a newer
Knowledgebase Article 71,079 views tags: deprecation discontinue end php upgrade

This article will explain how to change the Site URL or Home URL setting in WordPress. This may be useful if you have moved your WordPress site or are planning to move your WordPress site.
Knowledgebase Article 221,694 views tags: home site url wordpress wordpresstools

How do I increase my file size limit in my PHP application?
Knowledgebase Article 579,073 views tags: optimize php upload uploads

This article will explain how to login to a website created with WordPress.
Knowledgebase Article 502,400 views tags: access admin change dashboard edit login site wordpress

This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here