Fix: HTTP error when uploading images in WordPress
Assuming:
- You have enough memory allocated to PHP and (128MB is default for PHP5)
- You are uploading an image that is below the 2mb limit.
- You’ve messed with the permissions on the upload folder.
- 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
Comments are closed, but trackbacks and pingbacks are open.