PHP Configuration for Addon Domain
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

PHP Configuration for Addon Domain

Summary

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, this can be done in the cpanel by clicking on the icon "PHP Config", choose your version of PHP and then click Save. 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:

<?php
            phpinfo();
            ?>

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.

Knowledgebase Article 328,958 views bookmark tags: domain php


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

I do not want to see addon.maindomain.com. How do I do that?
Knowledgebase Article 334,514 views tags: accessible addon directory domain folders hidden htaccess inaccessible primary secondary

How do I stop people from being able to use the addon domain as a subdomain of the primary domain?
Knowledgebase Article 418,092 views tags: addon domain htaccess

What is an Addon domain?
Knowledgebase Article 528,812 views tags: addon domain

Related Help Content

I have setup a pointed/addon domain, where should I upload the files for this domain?
Knowledgebase Article 327,887 views tags: addon domain pointed

What is the difference between parked domains and addon domains?
Knowledgebase Article 446,386 views tags: add addon domain park parked

How do I change the PHP environment for my site with php.ini?
Knowledgebase Article 804,921 views tags: configuration ini php server

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

How do I FTP to my addon domains and subdomains without interfering with my main account.
Knowledgebase Article 455,736 views tags: addon domain ftp

How do I setup an addon domain or parked domain in my hosting account?
Knowledgebase Article 910,965 views tags: addon domains parked

Can I make subdomains for my addon domains on the account?
Knowledgebase Article 518,150 views tags: add addon dns domain park subdomain

I tried to assign a domain through the Domain Manager, but it does not allow me to. What is wrong?
Knowledgebase Article 326,052 views tags: addon domain park parked

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