WordPress HTTP Error with Nginx

While trying to upload a 4mb PDF file using the WordPress 2.7 media manager, I received a very unhelpful “HTTP Error” message. I found several references to mod_security being the problem, but that was for Apache setups. I finally stumbled on the true error by using the Browser uploader instead of the flash uploader. The real error message was 413 (Request entity too large). This lead me to the client_max_body_size directive of nginx. After adjusting this value to a larger value in my configuration file, my file uploaded successfully.

Hopefully this information comes in handy for a few people so that they don’t waste time on a wild goose chase with the Apache HTTP Error problem.

What exactly was the error?

The real error

The real problem.

7 thoughts on “WordPress HTTP Error with Nginx

    1. First, try asking your question in English, not ‘txt speak’. That way people won’t assume you’re a moron and ignore you.

  1. Great stuff, just got this error on some website i moved to nginx (because apache couldn’t handle it!) and fixed it because of your post.

    thanks.

  2. Did you have to do anything out of the ordinary to get the Flash uploader working? I moved from Apache to Nginx and the Flash uploader won’t even open the browse box on the Nginx server. Files are exact copies between the two servers and the standard upload works on the Nginx server.

    1. Nate B, I didn’t have to do anything special to get it working. I did set the client_max_body_size Nginx directive to allow larger file uploads, but I could still upload small files before increasing that limit.

    2. Oh, I forgot to add that the Nginx access and error logs should have additional information if it’s a problem on the server side. Use tail -f on the logs and hit the upload page to see if anything crops up.

Leave a Reply to Jon Stacey Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.