Configuring PHP directives in cPanel on VPS hosting packages using MultiPHP INI Editor
This article describes the steps necessary to configure PHP directives on VPS hosting packages using MultiPHP INI Editor.
Introduction
- cPanel offers the ability to configure PHP directives at the domain level (fully qualified domain, subdomain, etc.) through the MultiPHP INI Editor. Depending on the requirements of the installed applications or created websites, we can modify several PHP directives, such as: display_errors, error_reporting, max_input_vars, max_input_time, memory_limit, post_max_size, log_errors, upload_max_filesize, etc.
Requirements
- To configure the PHP directives of a domain, subdomain, or complete domain, you will need to access the control panel cPanel. This action can be performed either by accessing domeniu.xx/cpanel or cpanel.domeniu.xx, or from the WHM interface. The WHM administration data can be found in the email with the VPS management details.
Steps
- Once the control panel is accessed, we will go to the Software section and click on MultiPHP INI Editor.
- In the next window, we will have the ability to modify the values of PHP directives in two ways:
Basic Mode - configuring directives using interactive buttons and input fields.
Editor Mode - configuring directives by directly editing the php.ini file, located at /home/USER/public_html/php.ini
- In the Basic Mode tab, under Configure PHP INI basic settings, we will select the domain for which we want to make the changes.
- After the domain is selected, a list of basic PHP directives will be loaded. Here we will also be able to make the desired configurations with the help of interactive buttons and input fields. To save the new values, we will click the Apply button at the bottom of the page.
- We will be greeted with a confirmation message: Successfully applied the settings.
- If the PHP directive is not present in the list, we can configure it using Editor Mode. We will click on the Editor Mode tab and select the desired domain from the list.
- After the domain has been selected, we will have the option to manually edit the php.ini file through a text editor. Once the PHP directives have been added/modified, we will click the Save button on the right side of the page.