Web Hosting

Fix "413 Request Entity Too Large" (Upload Limit)

413 Request Entity Too Largeupload exceeds the maximumfile too big
5 min read Updated 12 June 2026 ESAGAMES Team

A 413 means the file you're uploading is bigger than the server allows. The fix is raising the limit in the web server and PHP — both have to agree. Here's how.

Raise it in nginx

Nginx caps the request body size. Raise client_max_body_size (in the http or server block) and reload:

client_max_body_size 64M;
# then: nginx -t && systemctl reload nginx

Raise it in PHP

PHP has two limits that both must be high enough — and post_max_size should be ≥ upload_max_filesize:

upload_max_filesize = 64M
post_max_size = 64M

On a panel?

DirectAdmin/cPanel let you change the PHP values via the PHP settings/selector, and the web-server limit may be managed for you — set both there rather than editing files.

Both layers must agree

If nginx allows 64M but PHP only 8M (or vice-versa), the lower one wins and you still get an error. Raise both to the same value and restart PHP-FPM/nginx.

413 = upload too big. Raise client_max_body_size in nginx and upload_max_filesize + post_max_size in PHP, then reload.

Web hosting with room to grow

Our web hosting gives you generous upload and PHP limits on fast NVMe, with DDoS protection included.

See web hosting
FAQ

Frequently asked questions

What does "413 Request Entity Too Large" mean?

The file or request you're uploading exceeds the server's maximum allowed size. You need to raise the upload limit in both the web server (nginx) and PHP.

How do I increase the upload size limit?

Set client_max_body_size in nginx and upload_max_filesize plus post_max_size in PHP to the size you need, then reload nginx and restart PHP-FPM. Both must be high enough.

Why does it still fail after raising the PHP limit?

The web server has its own limit (client_max_body_size in nginx). If that's lower than PHP's, it blocks the upload first. Raise both to the same value.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney