In а Zone managed server environment, ModSecurity is in use and therefore you may encounter the following messages when uploading large files (over 1 GiB) to your WordPress application:
Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page
The reason for the message is the ModSecurity configuration, which limits the size of the uploaded file. The limit is set to 1 GiB, and the Apache error logger is displaying an error message:
ModSecurity: Request body (Content-Length) is larger than the configured limit (1073741824)
Why is the restriction set?
This ModSecurity restriction is imposed for the following reasons:
- Security: ModSecurity checks all uploaded files for possible threats.
- Server load: Uploading large files can significantly increase server load, especially if they are not scanned efficiently.
It is not possible to modify or remove this ModSecurity configuration.
Solution: Chunked Upload
A modern solution for uploading large files is to use the “chunked upload” method, where the file is split into smaller chunks and uploaded to the server in stages. This solution bypasses the size limitation, allowing hassle-free uploads of files up to 100 GB.
Recommended plugin
To simplify the process, we recommend using the following WordPress plugin: Tuxedo Big File Uploads.
Installation instructions:
- Log in to your WordPress admin panel.
- Navigate to
Plugins
>Add New
. - Search for the
Tuxedo Big File Uploads
plugin and clickInstall Now
. - Once installed, activate the plugin.
- If necessary, configure the plugin according to your needs.
How to use it?
After activating the plugin, larger files can be uploaded directly to the WordPress media library without error messages or restrictions.