Vanilla install of WordPress on Apache upload issues
-
Hi, I installed a brand new version of WordPress last night. Before doing ANYTHING else (changing themes, installing plugins, etc), I tried to upload a 40MB mp4/webm file.
For everything I did, I got this error: “Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.”
I googled this to death; there is a solution for Nginx. However, I’m on an Apache server.
The sysadmin in me and Level 3 tech support of my hosting company spent over 15 hours troubleshooting this.
We did all the things you’d expect:
- Tried different accounts (in case the DNS environment, e.g. Cloudflare vs locally hosted DNS records were the issue)
- Rebuilt Apache
- Increased limits on PHP (like really, really high), especially the execution time. Reminder: this is a 40MB file. We had our file max size a lot higher than that.
- Changed PHP versions (8.2 -> 8.3 and back and forth. We’re not going back to 7.x because of it being deprecated and breaking other code on the server)
- Tried different PHP versions (suPHP / lsapi)
- Disabled mod_sec
- Tried smaller files (which worked)
- Installed WP on CLI vs via FTP
- …I’m sure there were other steps forgotten here…
But for whatever reason, when we hit the 35MB or so limit, this error would show up on every WordPress install on this server.
When the fix for nginx suggests client_max_body_size to be increased to 10M, that’s great. Except it doesn’t apply to Apache.
And when other random web pages for this error suggest these low limits (really? These are high?), they’re not much help either:
memory_limit = 256M
post_max_size = 76M
upload_max_filesize = 64M(Our limits were 512MB and up…)
So… what’s a person with Apache to do except to switch to Nginx? Seriously. That is what we did as a temporary solution. Not my ideal solution, so I’d like to find the Apache-specific fix to this error.
To add: there were NO logs – nothing in the web server logs, nothing in error_log, nothing in debug.log that was turned on in wp-config.php (in fact, debug.log was never created). Nothing. We created test environment after failure after failure. No go.
The four of us (again, level 3 support) believe we exhausted all options and that the solution is “don’t use Apache.”
That can’t be right. I mean, there are a billion servers out there running WP with Apache that must have no issue with this.
So… what *is* the solution? What else could we be trying that hasn’t been attempted yet?
Any real WP experts in Apache who can tell us what we’re overlooking?
- The topic ‘Vanilla install of WordPress on Apache upload issues’ is closed to new replies.