Changing the PHP post_max_size limit with CloudLinux in cPanel

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.

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

  1. 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.
  2. 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.
  3. Open Options and locate post_max_size. Record the current setting.
  4. Choose a value larger than upload_max_filesize and large enough for the expected complete request, within the limits offered by your hosting service. Save the change.
  5. Submit a representative test request and verify every expected field and attachment. If there are many small fields, investigate max_input_vars separately 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.

  • 0 Users Found This Useful
  • cpanel-whm, development
Was this answer helpful?

Related Articles

Changing the PHP upload_max_filesize limit with CloudLinux in cPanel

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The...

Managing PHP extensions with CloudLinux in cPanel

Extensions add capabilities such as database access, multibyte text handling, image processing...

Configuring allow_url_fopen with CloudLinux in cPanel

allow_url_fopen controls whether PHP file functions can use supported URL wrappers, such as...

Configuring PHP error display and logging with CloudLinux in cPanel

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem...

Adjusting the PHP memory limit with CloudLinux in cPanel

memory_limit limits memory available to an individual PHP script. Increasing it can help a...