Plesk provides full support for the PHP scripting language, including support for multiple PHP versions and handler types out of the box. This topic explains how Plesk customers can manage PHP settings for their domains and subdomains from the Customer Panel.
PHP management on the domain level consists of three aspects:
- Choosing the PHP version.
- Choosing the PHP handler type.
- Configuring additional PHP settings.
Note: You may only be able to manage some of the settings described below, or none at all, depending on your subscription settings. If you need to manage PHP settings that are unavailable to you, contact your hosting provider.
CHOOSING THE PHP VERSION
Plesk supports multiple PHP versions out of the box. To choose the PHP version for your domain or subdomain, go to Websites & Domains > PHP settings and select the desired PHP version from the menu:
If the desired PHP version is missing from the menu, contact your hosting provider.
Note that different PHP versions are not 100% compatible. A website written in PHP 5.3 may not function correctly if you configure PHP version 5.4 for the domain. If you are not sure what PHP version to choose, use the default setting or the latest version available. If your website is not displaying correctly, switch to a different PHP version.
CHOOSING THE HANDLER TYPE
Plesk supports a number of different PHP handlers out of the box. To choose the PHP handler type for your domain or subdomain, go to Websites & Domains > PHP settings and select the desired PHP handler type from the menu:
If you are not sure what PHP handler type to choose, read about the different PHP handler types.
CONFIGURING ADDITIONAL SETTINGS
In addition to the PHP version and handler type, there are a number of PHP settings you can manage at Websites & Domains >PHP settings. These settings are mostly performance and security-related, but some of them may affect the operation of websites. Click the icon next to an option to learn more about it.
Keep in mind that changing these setting may impact the performance of your website or even prevent it from displaying correctly. Unless you are sure what changes you need to make, it is recommended to keep the default values for all additional settings. If you make changes to the PHP settings and your website becomes slow or stops loading, revert all PHP settings to their default values.
ENABLING PHP ACCELERATION
If your hosting provider allows it, you may be able to switch on PHP acceleration, also known as opcode cache module, for your website. If your website is written in PHP, enabling the opcode cache module can speed it up by a factor of two or more. To switch on PHP acceleration, go to Websites & Domains > PHP Settings and set the value of
opcache.enable to “
VIEWING THE PHP SETTINGS
To view the PHP settings currently configured for the domain, including those configured on the server level, click View the phpinfo() page.
INHERITING PHP SETTINGS
Domains belonging to a subscription inherit the PHP settings defined on the subscription level. Subdomains inherit the PHP settings defined on the level of their parent domain. If you have the corresponding permissions on your subscription, you can change the PHP settings for every domain and subdomain independently of each other.