In WHM's MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager), the term Inherit refers to how Apache determines a domain or virtual host's PHP version. When you set an account or domain to Inherit, Apache uses the PHP version that exists in the first
.htaccess file that it finds in the domain's file structure.
How inheritance works
Only one single default PHP version exists in EasyApache 4's MultiPHP environment. You set this default version at the system level. The system sets the PHP version of each new account to the Inherit value by default, which indicates that no explicitly set version of PHP exists for the account.
When the system searches for the version of PHP to use, it starts in the cPanel & WHM default document root of the current domain and continues up the directory tree until it finds an
.htaccess file with PHP version information. Apache must locate an .
htaccess file to properly inherit a PHP version from a primary domain.
- If Apache does not find an
.htaccessfile, it uses the system default PHP version from WHM's MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager).
- If Apache finds an invalid version of PHP in the
.htaccessfile, it uses the system default PHP version set in WHM's MultiPHP Manager interface.
- For a primary domain, the default document root is the
- For a subdomain or addon domain, the default document root depends on your server's settings. For more information, read our Tweak Settings - Domains documentation.
We strongly recommend only that you only set the PHP version in an
.htaccess file in the document root. If you set your PHP version in an
.htaccess file in another location, you may experience unexpected behavior.
In the following table, assume that the system uses PHP 7.1 by default. PHP inheritance follows the following path:
|Domain name||Type||PHP setting||Has .htaccess file?||Effective PHP version|
There is no content with the specified labels