HTTP error when uploading images to wordpress media library

HTTP error when uploading images to WordPress media library
HTTP error WordPress

If your having problems uploading images to your wordpress media library and receiving HTTP errors, this may help you out.

This may only pertain to individuals that host their websites on ubuntu server 14.04.1. Not so much if you go through a hosting provider.

 

First, check your modsecurity log file: /var/log/apache2/modsec_audit.log

If you see something like this in your modsec_audit.log file:

Apache-Error: [file “fcgid_bridge.c”] [line 614] [level 4] mod_fcgid: HTTP request length %ld (so far) exceeds MaxRequestLen (%ld)

This means you need to increase your upload size.

To do this, open this file: vi /etc/apache2/mods-available/fcgid.conf

and add or edit the line “MaxRequestLen 15728640” to set the Request Limit to 15MB. The resulting file should contain these settings:

AddHandler fcgid-script .fcgi

FcgidConnectTimeout 20

MaxRequestLen 15728640

Save the changes and restart apache:

/etc/init.d/apache2 restart

There are no comments published yet.

Leave a Comment