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 cPanel, search for Select PHP Version and open the CloudLinux tool. It is commonly listed under Software. Select the intended domain if your installation displays a domain selector.
- Check the active PHP version and which websites the selector change will affect. cPanel may also offer MultiPHP Manager and MultiPHP INI Editor. These tools manage a different PHP configuration path. Identify whether the domain uses CloudLinux Alt-PHP or a native EasyApache PHP handler before editing.
- 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 permitted files can exceed the request limit
Suppose upload_max_filesize and post_max_size are both set to 32M. A form submits two 20 MB files. Each file is below the individual-file limit, but their combined size already exceeds the request limit before the form fields and upload overhead are included.
If the application and hosting service permit it, an illustrative post_max_size of 64M provides room for this particular request while the individual-file limit remains 32M. These are example values, not Nabtech plan allowances. Submit the form again and verify both saved files and every important field.
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 cPanel
- Managing PHP extensions with CloudLinux in cPanel