How do I increase PHP request length (FastCGI/CGI) to upload larger images?

I am using the One-Click Wordpress Image.

I have been unable to upload images to wordpress that are larger than ~128KB. I’ve tried various fixes and suggestions from an outside community from bypassing security features on .htaccess to playing with memory limits on php.ini but to no avail-

However, I do note that the similarities of my issue bare very closely to PHP using FastCGI module, which defaults the HTTP request length to 128KB.

So I think this is where my problem lies since I seem to be unable to upload images from about 100~KB onwards

Unfortunately- I can’t find anywhere in my /apache2 and /php5 folder the existence of such module. Only CGI module seems to exist in the mods-available, so it isn’t enabled at all.

Some notes:

I do not get flagged for error on console or on the dashboard during upload. It just hits a certain percentage really quickly and never moves. The smaller the image size the higher the percentage uploaded before stalling.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The PHP FastCGI set up works by running a few PHP workers as their own processes and having Apache communicate with them through the FastCGI protocol, instead of Apache running php as part of its own workers. Create a file in your document root with the following contents:


Once you browse to it, you will see a list with PHP’s configuration options. Check the following options and see if the changes that you made took effect.

  • upload_max_filesize
  • post_max_size

If not, you will need to edit /etc/php5/fpm/php.ini accordingly.

Don’t forget to restart the php5-fpm service after editing the config files. I would also recommend checking php’s error logs and seeing if that have any errors.

  • /var/log/apache2/error.log
  • /var/log/upstart/php5-fpm.log

I’d like to update that it turns out I am able to upload any and all images using Microsoft Edge browser- and not Chrome and Firefox.

Which is a glimmer of hope yet.