Plesk

How to change the list of predefined values, set the default value and forbid to use custom values for PHP parameters in domain’s PHP Settings in Plesk

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:

 

  1. Log in to Plesk.

  2. Install the Panel.ini Editor extension at Extensions > Extensions Catalog.

  3. Go to Extensions > My Extensions > Panel.ini Editor > Open and switch to the Editor tab.

  4. 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

  5. Click Save.