Tutorials • cPanel
Configuring PHP directives in cPanel
Configure PHP directives in cPanel to optimize your site's performance. Learn how to modify essential PHP settings with simple steps.
7
Views 1659Updated 10 luniPublished on 21/09/2017by Sebastian Szlivka
Introduction
- cPanel offers the ability to configure PHP directives at the account level. Depending on the requirements of the installed applications or the 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, opcache.enable, upload_max_filesize, etc.
- These changes will affect all domains added to the cPanel account, both the main and the addon (supplementary) ones.
Requirements
- To be able to modify the PHP directive values of the account, we will need the cPanel login credentials received in the admin email.
Steps
- First, we will log in to the cPanel control panel using the login credentials.
- Once we are logged into the control panel, we will go to the Software section and click on Select PHP Version.
- In the next window, we will have the possibility to change the PHP version and to enable or disable various PHP extensions.
- To modify the values of the PHP directives, we will click on Options.
- The next window will contain a list of existing PHP directives and their associated values.
- To make changes, we will click on the value to the right of the directive name. A dropdown list will appear from which we can select the desired value. After modification, these are saved automatically.