1. bluehost knowledge base

PHP Configuration for Addon Domain

To use specific PHP settings only for a particular addon domain you will need to place a php.ini file in the addon domain's folder.

Configure PHP for an Addon Domain

If you need to generate a new php.ini file:

  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.

This will copy the server's master php.ini to your public_html directory as "php.ini.default". This file must then be moved to the addon's folder and renamed to php.ini.

If you are using the 'single php.ini' option in the cPanel's PHP Config section, you will need to create a .htaccess file in the addon's folder. In the addon's .htaccess file it needs to contain a regular PHP handler:

AddHandler application/x-httpd-php7 .php

To verify your addon domain is using the php.ini file you have setup, you can create a new file in the addon's folder called info.php containing the following PHP code:


Viewing the info.php file in a web browser should show you all the PHP settings from the addon's php.ini including the "Loaded Configuration File". This is the path to the php.ini file being used.