Error when trying to upload large video files in WordPress

I’m having trouble uploading larger video files to my WordPress site. I keep receiving an error message that hints at an unexpected server response. It suggests that the upload might have been successful, and recommends checking the media library or reloading the page.

This issue arises specifically with MP4 files around 200MB, while smaller ones (like 27MB) upload without any problems. I have configured my WordPress to handle MP4 uploads of up to 5GB, and my php.ini settings reflect a max upload size and post size of 50GB, along with 1GB of memory.

Even after restarting PHP-FPM and Apache2, I’m stuck with this error. The video plays fine on my computer and other platforms, so it doesn’t seem to be corrupted. Can anyone shed some light on what might be causing this problem? Thanks!

Had this exact problem last year with a client’s video uploads. It’s usually timeout settings, not file size limits causing this. Your PHP upload settings look fine, but the server’s probably timing out during upload. Bump up max_execution_time and max_input_time to 600 seconds in php.ini - that fixed it for me. Also check if your host has gateway timeouts at the server level. In my case, files were uploading fine but the connection dropped before WordPress could process the response, which sounds like what you’re seeing with that media library error.

This sounds like a proxy or web server issue, not PHP limits. I hit the same thing when Nginx was using the default client_max_body_size - it caps at 1MB no matter what your PHP settings are. Check your web server config. For Nginx, find the client_max_body_size directive and bump it to something like 1G. For Apache, make sure LimitRequestBody isn’t blocking uploads. Your hosting provider might also have their own upload restrictions at the network level. I’d test with a smaller file around 100MB to find the exact threshold where it breaks. Since it mentions checking the media library, the upload might actually be finishing but the response is getting cut off.

check your host’s upload limits - they can block larger files even if php is all set. i’ve seen things like GoDaddy limitin uploads over 150MB. maybe try FTP to send the vid, then use a plugin like ‘Add From Server’ to get it into wordpress. that’ll help ya see if it’s a upload issue or something else.