WordPress media upload “HTTP error”

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 ?

1 Answer
1

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.

Leave a Comment