Websites

PHP settings

Set a PHP website's largest upload, memory per request, longest run time, form fields and PHP workers, written to its own PHP-FPM pool.

Last updated

Each PHP website runs in its own PHP-FPM pool, so its PHP limits can differ from other sites on the same server. Set them in the PHP settings card on the website's Settings tab.

The settings

SettingRangeDefaultWhat it sets
Largest upload (MB)1 to 204864upload_max_filesize and post_max_size, and NGINX's client_max_body_size for the site. The biggest file a form or the media library takes.
Memory per request (MB)32 to 4096128memory_limit: how much memory one page load may use.
Longest run time (seconds)5 to 360030max_execution_time and max_input_time. After this a page load is stopped. Imports and backups may need more.
Form fields100 to 1000001000max_input_vars. Large menus and page builders need more than 1000.
PHP workers1 to 10010pm.max_children: page loads the site answers at the same time. Each one can use the memory above.

The defaults are what every PHP website had before these settings existed.

Change them

  1. Open the PHP website and go to the Settings tab.
  2. In the PHP settings card, change the values, or click Recommended for WordPress to fill in values that suit most WordPress and WooCommerce sites (128 MB upload, 256 MB memory, 120 seconds, 3000 form fields, 10 workers).
  3. Click Save and apply.

Reset to defaults fills in the defaults again; click Save and apply to use them.

The agent writes the values into the site's PHP-FPM pool, and the upload size into the site's NGINX configuration, then tests both with php-fpm -t and nginx -t before they apply. If a test fails, the site keeps its previous settings.

Copies of a website

Clones and staging copies keep the PHP settings of the website they copy. Switching the site's PHP version keeps them too.