Fix: HTTP error when uploading images in WordPress

Assuming:

  1. You have enough memory allocated to PHP and (128MB is default for PHP5)
  2. You are uploading an image that is below the 2mb limit.
  3. You’ve messed with the permissions on the upload folder.
  4. You are using Ubuntu and can ssh to your server.

If you still encounter this error.  One thing to check is that your site is using Fact-CGI or mod_fcgid in apache speak.  This is default setting if you are using ISPConfig.

Unless it has been changed, the default value of

FcgidMaxRequestLen 131072

equates to an allowed upload limit of about 150k, not nearly close to 2mb imposed by wordpress.

Go ahead and make a change to your [site].vhosts file, it’s located at:

/etc/apache2/sites-available
<IfModule mod_fcgid.c>
    ...
    FcgidMaxRequestLen 2000000
</IfModule>

Now restart apache and you should be good to go, but check you haven’t messed up any configurations first.

sudo apachectl configtest 
sudo service apache2 restart

 

admin

Chris Tran is a Software Project Manager from Brisbane, Australia. When he's not enjoying time with his family, he works with some very talented people at KoBold Group Pty Ltd.

More Posts

Follow Me:
TwitterFacebookLinkedInGoogle PlusFlickrYouTube

Comments