Question
How to change the list of predefined PHP values, set the default PHP value and forbid to use custom values for PHP parameters in domain's PHP Settings?
Answer
These adjustments can be done in the Plesk configuration file panel.ini
either via Plesk interface or directly on the server (Linux - /usr/local/psa/admin/conf/panel.ini
, Windows Server - %plesk_dir%adminconfpanel.ini
)
The list of all PHP parameters and detailed instructions are available on this documentation page:
Example
In this example, the values of the upload_max_filesize
PHP parameter are customized this way:
- set 128M and 256M as predefined values in the drop-down list
- set 128M as the default size
- forbid user-defined values
-
Install the Panel.ini Editor extension at Extensions > Extensions Catalog.
-
Go to Extensions > My Extensions > Panel.ini Editor > Open and switch to the Editor tab.
-
Add the following lines to the field (if the editor field is not empty, scroll to the end):
[php]
; Predefined values in the drop-down list
settings.performance.upload_max_filesize.values[] = 128M
settings.performance.upload_max_filesize.values[] = 256M; Default value
settings.performance.upload_max_filesize.default = 128M; Forbid to specify custom values
settings.performance.upload_max_filesize.custom = false -
Click Save.