post_max_size limits the size of the entire HTTP POST body received by PHP. It includes submitted form fields and uploaded files together. When the request exceeds this limit, an application can receive empty POST and file data even though the visitor selected a file.
IN THIS ARTICLE
Prepare for the change
Identify whether the failed operation is a form submission, multi-file upload or import. Measure the total request rather than only its largest file. Keep the current value and check hosting storage, memory and application restrictions before making changes.
01 Change the setting
- In Plesk, select the correct subscription and open PHP Selector from the available sidebar or additional tools. This guide applies to Linux subscriptions where the CloudLinux integration is installed. Windows Plesk uses its own PHP configuration.
- Check the active PHP version and which websites the selector change will affect. Plesk also has a native PHP Settings page for each domain. A CloudLinux setting will not automatically override a different Plesk PHP handler. Confirm which handler serves the website first.
- Open Options and locate post_max_size. Record the current setting.
- Choose a value larger than
upload_max_filesizeand large enough for the expected complete request, within the limits offered by your hosting service. Save the change. - Submit a representative test request and verify every expected field and attachment. If there are many small fields, investigate
max_input_varsseparately because it limits the number of parsed input variables.
02 Example: two files in one form submission
Suppose a permitted form uploads two files of about 20 MiB each. Neither file exceeds an illustrative upload_max_filesize of 32M, but the complete request exceeds 40 MiB once form fields and multipart overhead are included. A post_max_size of 32M would therefore be too small.
If your plan and application allow it, 64M is an example request allowance with room for this particular test. It is not a Nabtech plan entitlement or a universal recommendation. Set approved values through the active selector, then confirm that both attachments and every required form field arrived. Retain separate application limits and check proxy restrictions if PHP never receives the request.
Confirm the expected result
Confirm the effective setting in the web application and check the server log for the test submission. A correct result includes all expected fields and files; a success banner alone can conceal missing form values in poorly validated applications.
What should I check when a larger post_max_size does not resolve the request failure?
A larger POST limit does not change reverse proxy limits, timeouts or an application's import rules. Avoid using unlimited values to work around an unidentified failure. If the request succeeds partially, reduce its size and examine the application's validation before processing live orders or customer records.
Related articles
- Changing PHP versions, extensions and application limits
- Diagnosing website problems with error logs and account information
- Understanding CPU, RAM, storage, inodes and data transfer
- Changing the PHP upload_max_filesize limit with CloudLinux in Plesk
- Changing the PHP version with CloudLinux in Plesk