Can’t upload image to wordpress due to large size


In my new job I have been working a little bit with cPanel and WordPress. It sounds easy enough and both of the products are easy enough normally. But there is always one of these fun errors that just makes you wonder. What the f*** could be the problem here. Everything seems fine but everything is so wrong.

When the users where going to upload files we changed the upload limit on the PHP server and everything should be working fine. The users should be able to upload files up to 250 MB. At least that was what I was thinking. But no matter what I did I got the following error up: “Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again”

My picture was below this size and I belive I tried every single solution to this issue I could find on the internet. The only solution that worked for me was the plugin Add from Server, with this plugin I was able to get my pictures to the libary.

After hours of googling and talking to coworkers we suddenly discovered that cPanel is not delivered with mod_fcgid turned on in Apache. This simple feature took me ages to find out. In addition you need to install the imagick module.

imagick you can install in cPanel by go to Software -> Module Installer in the left menu. Manage the PHP PECL and search and install imagick for all needed PHP versions (at least where you run WordPress).

Then you need to enable mod_fcgid. This can be done in Software -> Easy Apache 4 on the left side menu and choose Customize on the menu showing. Now you can go to Apache modules and search for mod_fcgid. When this module is enabled you can try to upload again. Hopefully it works now!

Be aware that the changes done here needs to be done by your hosting provider and unless you have access to the WHM console you need to forward them this article to fix the issues.