Uploading Theme To Wordpress and Get 413 Request Entity Too Large

March 26, 2014 10.1k views
Hello, I have followed all the tuts on this site, I have a Wordpress Nginx install. When I try to install a theme; however, I don't get this when installing plugins or any other thing. I get Get 413 Request Entity Too Large error. Any help would be grateful. Thanks, C
3 Answers
add/increase client_max_body_size in the nginx configuration file http area/section:
http {
client_max_body_size 32m;
(other lines will also be here)


Check and/or increase the following:
upload_max_filesize = 32M
post_max_size = 32M

Optionally increase:
max_execution_time =300
memory_limit =128M

Restart nginx or your server for the changes to take effect after applying changes. The default client_max_body_size is 1 megabyte so most likely your theme is larger than 1 mb and you need to increase it to an amount larger than the size of the theme you are trying to install.

Otherwise, you could most likely upload your theme by ftp instead if it's available.

Additionally you can set the above examples to suit your needs.
  • Hi, i am also getting this 413 error. So, in the nginx.conf i set the clientmaxbodysize to 32M, in the php.ini, the uploadmaxfilesize to 32M and the postmax_size to 33M, and the optionally increase to. But i still getting the 413. Any help?

    • I'm using Wordpress Multisites and i increase the Maximum upload file size in the network admin to 30M.

    Thak you

I want to ask you i add line in server but when i go to save file with ctrl x i am unable to save ,can u tell me how to save nginx conf file?
vim /etc/nginx/nginx.conf.
If you're using vim, you need to press Escape, type :wq, and press Enter to save a file.
Have another answer? Share your knowledge.