Solving a WordPress 'http error'

Tonight we were trying to make the first post on my wife’s blog and ran smack into a “Http error” message. When I looked in the console of my web browser I found an error 413 (Request Entity Too Large) message. After a bit of Googling it turns out that Nginx was the culprit. Apparently the default value of client_max_body_size is 1 meg. As I am sure you can imagine, most images grabbed with a camera phone are larger than that now.

The solution was to add client_max_body_size 1024M; to my Nginx config. I picked the size for this setting so that it matched what I put in my php.inifile. Speaking of my PHP config, I am using PHP 7 and added the modified these settings:

upload_max_filesize = 1024M  
post_max_size = 1024M  
memory_limit = 1024M  
max_execution_time = 180

Lastly, in case anyone reading this is wondering how Nginx fits into a WordPress install, its actually being used as a proxy for Apache (among other things).

This article, and others like it, can also be found on my blog at https://beanbag.technicalissues.us



To view or add a comment, sign in

More articles by Gene Liverman

  • An Unsupportable Path

    Back in December I wrote about how we, the community behind the open source project called #Puppet, were being forced…

    1 Comment
  • The community is forking Puppet

    So, here's an updated tl;dr on #Puppet as an #OpenSource project: a fork is absolutely coming now. There was a "town…

    13 Comments
  • Breaking up a large pull request

    Ever finished up all the changes for a pull request on GitHub and realized it was just too big to review easily or to…

  • My journey to securing sensitive data in Puppet code

    Dealing with secrets and sensitive data in Puppet is daunting, right? Nope, not at all. Let me show you how to do it.

  • The Road to Puppet 5

    Not long ago Puppet released version 5 to the open source world so, naturally, it was time to start updating all my…

  • Automatically generate GoAccess stats

    I've been using GoAccess to look at my logs for a while now. The other day I decided I wanted be able to look at these…

  • Node.js, CentOS7, and libhttp_parser.so.2

    Don't you just love it when package maintainers break you blog? Yeah, me too. Tonight I went to post an article (no…

    2 Comments
  • Zabbix 3.2 is WAY more efficient!

    Recently our Oracle DBA hit me up and said that all of a sudden some of his servers were showing a load average of…

  • Exploring Grafana

    This weekend I decided to check out Grafana. My first test for it was setting up the Zabbix backend.

  • SSL, Name-based Virtual Hosts, and Let’s Encrypt

    When I started switching everything I could over to https-only I was under the impression that the only option was to…

Explore content categories