Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Large file uploads rejected: fix upload_max_filesize limits

OPS-086Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Every server caps how big a file upload can be. In PHP, upload_max_filesize sets the largest single file. post_max_size sets the largest whole request, including all form fields. Web servers add their own cap, such as client_max_body_size in Nginx or LimitRequestBody in Apache.

Why it costs you leads or sales

Upload fields sit in high-intent forms: quote requests, job applications, claims, custom orders, design briefs. The visitor has already done the work. If the file is rejected, most will not resize it and retry. They leave, and you never see the lead.

Where a large upload breaks
  1. Open formPage loads fine
  2. Attach 12 MB fileBrowser accepts it
  3. SubmitServer limit is 2 MB, request rejected
  4. Email and CRMNever receives the lead
  5. Conversion tagThank-you page never shown

The visitor fills in the form, attaches a big file and submits. The server refuses the request, so nothing after that happens.

Submissions by attachment sizeExample numbers
Submissions by attachment size (example)Under 1 MB: 98 % of attempts that succeed; 1-2 MB: 90 % of attempts that succeed; 2-5 MB: 8 % of attempts that succeed; Over 5 MB: 0 % of attempts that succeed03875989080Under 1 MB1-2 MB2-5 MBOver 5 MB% of attempts that succeed

Example: illustrative numbers for a form with a 2 MB server limit. Success drops sharply once files pass the limit.

How to check if your site has it

Find your real limits and test them
  1. Note the size your form promises

    Check the help text and the form plugin settings for the maximum file size and allowed types.

  2. Read the PHP limitsWordPress

    In WordPress, open Tools > Site Health > Info > Server and look at 'Upload max filesize' and 'PHP post max size'. On other PHP sites, run phpinfo() on a protected page or ask your host.

  3. Check the web server limit

    Look for client_max_body_size in Nginx config or LimitRequestBody in Apache. If you use a CDN or proxy, check its upload limit too.

  4. Submit the form with a large file

    Use a real file just under the size you advertise, such as a 9 MB PDF for a 10 MB limit. Do it as a visitor would, in a private window.

  5. Check the logs

    Look in the PHP error log and the web server error log for messages about body size or exceeded limits.

Which limit produces which symptom
LimitWhere it livesTypical symptom
upload_max_filesizephp.ini, .user.iniPHP error: file exceeds upload_max_filesize
post_max_sizephp.ini, .user.iniForm arrives empty, fields missing
client_max_body_sizeNginx413 Request Entity Too Large
LimitRequestBodyApache413 error
max_execution_time / timeoutsPHP, proxySlow upload then timeout or 504

How to fix it

Set post_max_size slightly higher than upload_max_filesize, and make sure the web server limit is at least as high as both. Then restart or wait for PHP to reload.

Raise the upload limit by platform
  1. Ask your host first

    Many hosts have a PHP settings screen in their control panel (often called PHP Options or MultiPHP INI Editor). Set upload_max_filesize and post_max_size there.

  2. Or edit .user.ini

    In the site root, add the lines shown in the snippet below. Changes can take a few minutes to apply.

  3. Check the form plugin

    Plugins such as Contact Form 7 or Gravity Forms have their own file size setting. Raise it to match.

.user.ini (PHP on many shared hosts)text
upload_max_filesize = 32M
post_max_size = 40M
max_execution_time = 120
Nginx: allow bigger request bodiesnginx
server {
    client_max_body_size 40M;
}
Upload limits before and after

Before

  • Form promises 20 MB
  • upload_max_filesize is 2 MB
  • Large files fail with a vague error
  • Leads lost silently

After

  • upload_max_filesize 32M, post_max_size 40M
  • Web server limit is 40M or higher
  • Form states the maximum size
  • Large files arrive in inbox and CRM

How to confirm it's fixed

Confirmation checklist
  • Site Health or phpinfo shows the new upload_max_filesize and post_max_size
  • A file just under your advertised limit uploads successfully
  • A file over the limit shows a clear message, not a blank page
  • The submission reaches your inbox and CRM with the attachment
  • The thank-you page or confirmation loads and conversion tags fire
  • No new errors in the PHP and web server logs

How to prevent it happening again

Prevention
  • Write the maximum file size on the form and keep it in sync with the server
  • Re-test a large upload after hosting moves, PHP upgrades and plugin updates
  • Keep PHP and web server limits in your migration checklist
  • Check CDN, firewall and proxy upload limits when you add one
  • Test with real phone photos and PDFs, not only tiny files

How FunnelGuard handles this

FunnelGuard detects this only partly. Its robot runs your form on a schedule and does fill in and submit an upload step, but that step uses small files. So it confirms that the upload field works, that the form submits, and that the test lead reaches the inbox and CRM.

It does not try files near or above your size limit. A server that accepts a small test file but rejects a 10 MB PDF will still pass the check. FunnelGuard will, however, catch related breakages such as the form failing outright or the lead not arriving.

A large upload meets a small limit

The form looks fine until the file is bigger than the server allows.

Questions people ask

Why is my form upload failing for large files?

The file is probably bigger than a server limit. PHP's upload_max_filesize and post_max_size, or a web server setting like Nginx client_max_body_size, may be set lower than the file. The lowest limit in the chain wins, so check all of them.

How do I increase upload_max_filesize?

Edit php.ini or .user.ini, or use your host's PHP settings screen, and set upload_max_filesize to the size you need. Also raise post_max_size to slightly more than that. Then reload PHP or wait a few minutes for the change to apply.

What is the difference between upload_max_filesize and post_max_size?

upload_max_filesize caps a single uploaded file. post_max_size caps the whole form request, including all files and fields. Set post_max_size higher than upload_max_filesize, or large uploads can still fail.

Why do I get 413 Request Entity Too Large?

The web server or proxy blocked the request because the body was bigger than its limit. In Nginx, raise client_max_body_size. In Apache, check LimitRequestBody, and also check any CDN or firewall in front of your site.

How do I increase the upload limit in WordPress?

Check Tools > Site Health > Info > Server for the current values. Raise them in your host's PHP settings or in .user.ini, then check the form plugin's own file size setting. Test with a large file afterwards.

Can I fix upload limits on Shopify or Wix?

Not at server level, because the platform controls it. Check the file size limit in your upload field or app, and make your form's help text match what it really allows.

Will FunnelGuard catch a large upload being rejected?

Only partly. FunnelGuard's upload step uses small files, so it checks that the form and lead delivery work but not large-file limits. Test a file near your limit by hand after changes.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Upload step uses small files.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.