Question
How to change PHP settings in Plesk?
Answer
-
Go to Domains > example.com > PHP Settings.
Note: To allow Plesk resellers/customers customize PHP settings for their domains, visit this KB article.
-
Adjust PHP settings according to your needs and apply the changes. Click on a value field to set a custom value.
-
Go to Service Plans > plan_name > PHP Settings.
-
Adjust PHP settings according to your needs and click Update & Sync.
Note: New settings will not be applied to existing subscriptions, if:
- A subscription is locked from syncing with its service plan.
- Permissions settings allow PHP management in this service plan. To revoke them, visit this KB article.
-
Go to Tools & Settings > PHP Settings > click on a required PHP version (any application) > switch to the php.ini tab.
-
Adjust values for existing PHP parameters or specify your own. Once done, apply the changes.
Note: Customized PHP settings configured on a domain level override directives in php.ini file. To make a domain use values from global PHP configuration, in domain's PHP settings click Reset To Default next to PHP parameters.
In the Plesk PHP Settings menu, the following parameters can be adjusted per domain/service plan:
-
Performance and security settings
- memory_limit
- max_execution_time
- max_input_time
- post_max_size
- upload_max_filesize
- opcache.enable
- disable_functions
-
Common settings
- include_path
- session.save_path
- mail.force_extra_parameters
- open_basedir
- error_reporting
- display_errors
- log_errors
- allow_url_fopen
- file_uploads
- short_open_tag
-
PHP-FPM settings (If PHP is running as FPM application)
- pm.max_children
- pm.max_requests
- pm
- pm.start_servers
- pm.min_spare_servers
- pm.max_spare_servers
Additional PHP parameters or custom values can be specified in the Additional configuration directives field. This field is available for Plesk administrators only.
Use these units to define digital memory capacity:
- K for kilobytes
- M for megabytes
- G for gigabytes