Uploading Theme To Wordpress and Get 413 Request Entity Too Large

  • Posted on March 26, 2014
  • charlesAsked by charles


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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

nginx.conf <br>add/increase client_max_body_size in the nginx configuration file http area/section: <br>http { <br>client_max_body_size 32m; <br>(other lines will also be here) <br>} <br> <br>reference: <br> <br> <br> <br>php.ini <br>Check and/or increase the following: <br>upload_max_filesize = 32M <br>post_max_size = 32M <br> <br>Optionally increase: <br>max_execution_time =300 <br>max_input_time=300 <br>memory_limit =128M <br> <br>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. <br> <br>Otherwise, you could most likely upload your theme by ftp instead if it’s available. <br> <br>Additionally you can set the above examples to suit your needs.

One thing that got me initially when the suggested changes didn’t work, was that in addition to restarting nginx, I also had to restart php-fpm as well before I was able to successfully upload files to Wordpress.

“# service php-fpm restart”

For anyone having trouble locating the php.ini file, mine was located at /etc/php/7.0/fpm/php.ini. Placing a php.ini file in the /wp-admin folder did not work for me. I also ended up rebooting the server after I made changes to php.ini, then the new upload limit worked perfectly.