Uploads can fail before the application sees the file. Diagnose the first limit reached rather than making every value enormous.

Understand the layers

upload_max_filesize limits an individual uploaded file. post_max_size covers the complete request, including other files and form fields. memory_limit constrains PHP process memory. The application and web server may impose smaller limits independently.

For a genuinely required 20 MB single-file upload, a configuration might permit 20M for the file and a larger total request. This is an example, not a recommendation for every account. Decoding a compressed image can require far more RAM than its file size suggests.

Troubleshoot in order

  1. Note the file size, format and application’s stated limit.
  2. Confirm the target domain and PHP runtime.
  3. Adjust only the necessary settings in the applicable INI or Selector interface.
  4. Test a small valid file, then the intended file. Check temporary space and disk quota.
  5. If a proxy or application rejects the request first, ask support or the developer to review that layer.

Do not disable validation or permit executable uploads to fix a size error. Large imports often belong in an authenticated background or CLI workflow rather than a browser request with an unlimited timeout.

Official references

Reviewed 2026-10-22. Menus and availability depend on your hosting plan and server configuration.

Explore all cPanel guides →