WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to upload an image, I get the following error: HTTP error.

I know this problem has been solved hundred times but I can't find the right answer form my configuration.

In the php.ini, I have the following:

upload_max_filesize = 50M
max_file_uploads = 20
post_max_size = 50M

And in my wp-config.php, I added:

define('WP_MEMORY_LIMIT', '120MB');

I am using nginx, so every answers using .htaccess are not useful for my case. How can I solve my problem ?

share|improve this question
up vote 2 down vote accepted

I figured out how to fix my problem.

In my nginx config file (/etc/nginx/nginx.conf) I added client_max_body_size 100m; at the end of the #Basic Settings in the http {} section.

I hope this answer will help some of you and please tell me if there is any better solution to this problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.