Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

Nginx – 413 Request Entity Too Large (while uploading wordpress theme)

Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Setting up a website on VPS is always fun.

I selected DigitalOcean for BestFlare, and while uploading the WordPress theme, I got request entity too large error.

Are you in the same situation?

Error, which I got:


Let’s find out how large was requested entity.

  • Login to Nginx server
  • Go to the error file log location. The default location is:
  • View the file and look for the error, you should see something like “client intended to send too large body.” This is what I was receiving in logs.
2015/06/12 23:10:47 [error] 1489#0: *10 client intended to send too large body: 8338355 bytes, client:, server:, request: "POST /bestflare/wp-admin/update.php?action=upload-theme HTTP/1.1", host: "", referrer:

By default, Nginx is configured with 2 MB to accept the body size, and as you can see in a request, it was around 8.5 MB hence the above error.

Fix request entity too large error

Add the following parameter in nginx.conf file. A default installation location is /etc/nginx/nginx.conf

client_max_body_size 10M;

I have added 10MB. Of course, you can adjust this based on the requirement.

To get this reflected, you need to restart the Nginx. Now you should be able to upload the WordPress themes.

Thanks to our Sponsors
More great readings on Nginx
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder