Can't upload files to wordpress
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | wordpress (Juju Charms Collection) |
Undecided
|
Unassigned | ||
Bug Description
When you create a post or customize your site's appearance, you have the opportunity to upload files (i.e. pictures etc), which brings you to the "insert media" page.... uploads using this page apparently always fail with "http error". It appears to be an nginx configuration problem.
Note, I'm using just the default settings for wordpress (tuning=single etc) and mysql. This is easily reproducible with local provider (but is not specific to local provider).
| Nate Finch (natefinch) wrote : | #1 |
| description: | updated |
| Johan Ehnberg (johan-ehnberg) wrote : | #2 |
I am seeing this as well. The cut-off seems to be around 1M. It happens despite the following settings:
/etc/nginx/
client_
/etc/php5/
upload_max_filesize = 16M
post_max_size = 8M
| Richard Harding (rharding) wrote : | #3 |
I've changed the nginx conf, which was set to 512k out of the default deploy, restarted nginx, and been able to upload a 1.8mb file.
sudo vim /etc/nginx/
# change client_
sudo service nginx restart
and the upload worked.

Appears to be an nginx configuration problem:
/var/log/nginx$ more error.log 10.0.3. 202/wp- admin/customize .php?return= %2Fwp-admin% 2F" 10.0.3. 202/wp- admin/post- new.php"
2015/09/03 14:24:00 [error] 31196#0: *161 client intended to send too large body: 1326272 bytes, client: 10.0.3.1, server: _, request: "POST /wp-admin/async
-upload.php HTTP/1.1", host: "10.0.3.202", referrer: "http://
2015/09/03 14:41:49 [error] 31196#0: *314 client intended to send too large body: 1326367 bytes, client: 10.0.3.1, server: _, request: "POST /wp-admin/async
-upload.php HTTP/1.1", host: "10.0.3.202", referrer: "http://
Note, I'm uploading a file that is 1.3MB picture, and wordpress is defaulted to supporting 2MB... but evidently nginx's configuration is different.