Max URL length

What issue or error are you experiencing?

Hi everyone!

I have some urls on my website with a lot of parameters in GET, generating some very very long urls (nearly 7000 characters).
On several environments I tested, it works fine.
But on local, the page crashes instantly with a “ERR_CONNECTION_CLOSED”.
I tried with Apache and Nginx and it’s the same.
With nginx, I tried to add this line at the end of the nginx.conf.hbs file:

client_max_body_size 1000M;
large_client_header_buffers 8 128k;

In Apache, I tried this:
LimitRequestLine 100000

I am a bit clueless at this point.
Did anyone encountered this and could help me?
Thanks a lot for your help!
Have a nice day.


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

Just try to open an url with a lot of parameters, something like 7000 characters


System Details

  • Local Version:
    Version 8.3.2+6660

  • Operating System (OS) and OS version:
    macos Sonoma 14.4.1 (23E224)


Local Logs

local-lightning-verbose.log (30.0 KB)


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 @jbjanot

Could you use a URL shortening service like Bitly, TinyURL, and is.gd to convert these into shorter, more manageable links? These services take a lengthy URL as input and generate a shorter, unique URL that redirects to the original long URL when accessed.

Otherwise you might have to explore some other creative workarounds for this as it will be tough to handle as is.

Hi @Nick-B, thanks for your answer.

I have indeed several possibilities to prevent this that are on the way, but it is quite a huge website and I can’t have a change like that quickly.

If there is no solution you are aware of, I will have to change my local server tool for this website :cry:
Just to be sure, is there any configuration you could think of?

Thank you for your time!

I think your hunch is correct – ie, those settings would be where I would look. I wonder if the limitation is with Local’ router? Can you try disabling the router by navigating to “Preferences > Advanced” and setting the “Router Mode” to localhost?

Under this setting, you won’t be able to use HTTPS, and you the url will look like localhost:10010 instead of example.local, but that does mean there’s one less piece of infrastructure between your browser and the actual WP site.

For more info about Local’s Router Mode feature, see this help doc: Router Mode

Can you give that a try and let us know what you encounter?

Hi @ben.turner, and thanks a lot for your answer. Sadly I don’t have anymore time to test the installation with the basic router (I moved on to another local server), and as I have too many websites running on Local, it could not be an option to keep using it anyway.

If I have a chance to test it in the future I will update the thread.
Thank you!

1 Like