Wordpress: "HTTP Error." When Uploading Files Wordpress: "HTTP Error." When Uploading Files wordpress wordpress

Wordpress: "HTTP Error." When Uploading Files


I had a similar problem with Nginx and PHP5-FPM (and WordPress 4.1).

Symptoms: the file (< 5MB, so relatively small) is partway through the transfer, as indicated by the progress bar, when suddenly you get the HTTP error message.

Even if you've set upload_max_filesize in your php.ini, you should also check post_max_size is (at least) as big. Remember to restart php5-fpm.

If it still doesn't work, edit your nginx.conf file (in Debian/Ubuntu it's /etc/nginx/nginx.conf) and add this in the http block:

client_max_body_size 100m;

Then restart Nginx.


One of our clients, had the same issue.

Finally we found out that the wordpress "HTTP Error" when uploading images, was happening due to a change on the server side. The hosting comany, decided to add APC accelerate to the server in order to increase server's stability and speed. APC accelerate should work only with FastCGI and not with su, so they set PHP to run as FastCGI.

When using PHP as FastCGI, if you try to upload a file larger than 128KB, an error "mod_fcgid: HTTP request length 131388 (so far) exceeds MaxRequestLen (131072)" occurs and causes an 550 internal server error.This happens because the value of MaxRequestLen directive is set to 131072 bytes (128KB) by default.One way to correct this (if server uses Plesk), is to edit /etc/httpd/conf.d/fcgid.conf and set MaxRequestLen to a higher value, for example 15MB (MaxRequestLen 15728640).If server uses cPanel, this change can be done via the WHM of the server.

So, if you can upload images up to 128KB, this is the solution to your problem.


Put this line in your wp-config file:

define('WP_MEMORY_LIMIT', '64M');