Custom PHP.ini

I have a couple of questions about custom PHP.inis. Hopefully someone would be able to give me some direction here.

First, I have an account with DH with several domains and subdomains. I need to create a custom PHP.ini to enable certain features not found in the default ini.

1.- If I create a custom php.ini will this affect all my domains or will this be treated in a per-domain case.

2.- if I create a custom php.ini for one domain will I need to create another ini for its sub-domains?

3.- If for some reason I need to revert back to the original default php.ini is there a way to do so? or once you choose to go custom there is no way back?(scary…)

4.- How can I copy the current default php.ini and use it for reference. I figure if I start the process by duplicating the default ini and get everything running, then I can continue with incremental changes.

Any thoughts most appreciated.


1, 2. Custom php.ini is per domain. Subdomains don’t have any special connection to their parent domain, so subdomains are separate as well.

  1. Yes, removing the htaccess rules that activated the custom php.ini will revert you to the default.

  2. Start with /etc/php5/cgi/php.ini - that’s the configuration we use by default.


thanks for the quick reply. The info you provided clarified my concerns.

These are great news, I can limit the risk by first starting with a sub-domain to run a test install and then roll over into a production domain.

Best regards.