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
- Log in to Plesk and go to Websites & Domains.
- 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.
Recommended values
| Setting | What it controls | Typical value |
|---|---|---|
memory_limit | Maximum RAM one PHP request may use | 256M (512M for WooCommerce or page builders) |
max_execution_time | Seconds a script may run | 120–300 |
max_input_time | Seconds allowed to parse uploads and input | 120–300 |
post_max_size | Maximum size of a POST request | Slightly larger than the upload size, e.g. 128M |
upload_max_filesize | Largest single uploaded file | 64M–128M |
max_input_vars | Number of form fields accepted | 3000–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
.htaccessrules 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 = 256Values 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.iniorphp_valueline in.htaccessmay override it, or the application sets its own limit (for exampleWP_MEMORY_LIMIT). - Upload still fails at the same size: raise both
post_max_sizeandupload_max_filesize; Nginx may also limit body size viaclient_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".
