Unable to add any file > 128 kB to the Media Library if Apache webserver

What issue or error are you experiencing?

unable to add any file > 128 kB (yes kilobytes) to the Media Library if Apache webserver

error message : “The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.”

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

-install current localWP Version 8.1.0+6514.
-leave all settings as default, except webserver : Apache (not nginx).
-Fresh WP site (6.4.2) and default theme Twenty Twenty-Four.
-Go to Media. Add new media file. Select any file > 128 kB.

System Details

  • Local Version: 8.1.0+6514

  • Operating System (OS) and OS version: Windows 10.

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-lightning.log (1.8 KB)

More interesting is the Apache Site-error.log :
“[Fri Dec 08 19:47:25.333337 2023] [fcgid:warn] [pid 10116:tid 1348] [client] mod_fcgid: HTTP request length 134975 (so far) exceeds MaxRequestLen (131072), referer: http://test128k.local/wp-admin/upload.php
It shows the size limit of 128 kB being exceeded.

see also : see : https://community.localwp.com/t/cant-upload-images/31596 : “Can’t upload images”
which was closed on Oct 18, '22 without a solution except switching to nginx…

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @jpgoem

Just as a test if you switch to NGINX are you seeing any errors or does it work there?

Can you share your full local log? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

Hi Nick-B,
The problem only happens with Apache webserver, never with nginx.
And only with any file larger than 128 kB, never with smaller files.

Here is the requested zip file :
local-logs.zip (5.5 KB).

I guess the problem is related to the FcgidMaxRequestLen value which defaults to 128 kB.

I did some further investigation and found a bypass to the problem.
I edited the C:\Users\xxxxxxx\Local Sites\mywebsite\conf\apache\modules.conf.hbs and added the following at the bottom of the file :

<IfModule mod_fcgid.c>
      FcgidMaxRequestLen 134217728

Now I can add files with sizes up to 128 MB (Megabytes) in the Media Library !
It should be nice that this update be standard in a next localWP release.

I do support the feature request described in https://community.localwp.com/t/cant-upload-images/31596. It should be nice that these features implemented in a future localWP release.

Thank you for the support.

Hi @jpgoem!

You’re right that the FcgidMaxRequestLen property would fix the issue. We actually did add that config last year, but my guess is you downloaded Apache before we added that fix, so your version in Local might be outdated. Here’s how you can make sure you’re on the latest version of Apache:

  1. Check Your Current Apache Version:
  • Go to Help -> Reveal Local's Logs in Local.
  • In the logs folder, navigate to the lightning-services directory.
  • Look for a folder named like apache-2.4.43+X. Please note down the version string and build number.
  1. Manually Update Apache:
  • Stop your sites and close Local.
  • Delete the apache-2.4.43+X folder you found. This will remove the outdated Apache service from your machine.
  1. Redownload and Update Apache:
  • Reopen Local.
  • Start your site as usual. This action will trigger an automatic redownload of the latest Apache files from our Content Delivery Network (CDN).
  1. Verify the Update:
  • After the service redownloads, check the Apache directory again. The new folder should have a newer +X build number.
  • Confirm that the FcgidMaxRequestLen configuration block is now present at the bottom of the Apache config file.

Unfortunately, Local currently doesn’t have a feature to automatically update web server service files (like the *.conf.hbs files) when the actual version of Apache stays the same. Our in-place update functionality is limited to PHP only at the moment, but I’ll note that we should be extending that feature to all of our services!


Hi adamperry,

Thank you for the reply and the clear explanation.
I applied the suggested steps to upgrade Apache :

  1. version string and build number : apache-2.4.43+7.
  2. OK.
  3. OK.
  4. version string and build number : apache-2.4.43+8. I confirm that the FcgidMaxRequestLen configuration block is now present at the bottom of the Apache config file. I see that FcgidMaxRequestLen is now 30000000 (30 MB). I updated FcgidMaxRequestLen to 300000000 (300 MB) allowing up to 300 MB file-sizes additions in the Media Library.

Thank you for the nice support !


This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.