Plesk

Change PHP settings in Plesk: memory_limit, upload size and more

Raise memory_limit, upload_max_filesize, post_max_size and max_execution_time per domain in Plesk, choose PHP-FPM handlers and add custom php.ini directives.

BeginnerPlesk3 min read

Many errors in WordPress and other PHP applications come from PHP limits that are too low: uploads that fail, imports that time out or "Allowed memory size exhausted" messages. Plesk lets you change these values per domain without touching server-wide files. This guide covers the settings that matter and safe values to use.

Before you start

  • Your subscription needs permission to change PHP settings. If the fields are greyed out, your provider has locked them.
  • Pick the right PHP version first. Changing the version is covered in change the PHP version per domain in Plesk.

Open the PHP settings

  1. Log in to Plesk and go to Websites & Domains.
  2. Under the domain, click PHP (or Hosting & DNS → PHP).

The page shows the PHP version, the handler and two groups of settings: Performance settings and Common settings.

SettingWhat it controlsTypical value
memory_limitMaximum RAM one PHP request may use256M (512M for WooCommerce or page builders)
max_execution_timeSeconds a script may run120–300
max_input_timeSeconds allowed to parse uploads and input120–300
post_max_sizeMaximum size of a POST requestSlightly larger than the upload size, e.g. 128M
upload_max_filesizeLargest single uploaded file64M–128M
max_input_varsNumber of form fields accepted3000–5000 for large menus

Select Custom in a drop-down to type your own value, then click Apply or OK. Changes take effect within seconds; PHP-FPM is reloaded automatically.

Choose the PHP handler

  • FPM application served by nginx – fastest for most sites, but Apache .htaccess rules are ignored.
  • FPM application served by Apache – the default and the safest choice for WordPress and other apps that rely on .htaccess.
  • FastCGI application served by Apache – older and slower; use only if an app requires it.

With PHP-FPM you can also tune pm.max_children and pm mode under Performance settings. Increase pm.max_children if the site returns 503 errors under load and the log mentions reaching the limit.

Add custom directives

Scroll to Additional configuration directives and enter any php.ini lines, for example:

opcache.memory_consumption = 256

Values entered here override the fields above. Avoid disabling security functions or changing open_basedir unless you know why.

Check the active values

Create a file info.php in httpdocs with <?php phpinfo();, open it in the browser and search for the setting. Delete the file afterwards because it reveals server details. In WordPress, Tools → Site Health → Info → Server shows the same values.

Troubleshooting

  • Value does not change: an .user.ini or php_value line in .htaccess may override it, or the application sets its own limit (for example WP_MEMORY_LIMIT).
  • Upload still fails at the same size: raise both post_max_size and upload_max_filesize; Nginx may also limit body size via client_max_body_size.
  • Fields are locked: the service plan prevents changes. Ask your provider to allow PHP settings management.
  • Memory errors persist: see fix "Allowed memory size exhausted".

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.