Apache 413 Request Entity Too Large

On a CentOS server, when uploading a 100 MB video file in WordPress media manager, I got the following error message

The server had mod_security installed. I edited the mod_security config file

Set following for values and restart Apache.

But I still get the same error. So I disabled mod_security by moving the config file to a temporary directory and restarting apache.

The error was due to Apache setting LimitRequestBody, the error is fixed by adding “LimitRequestBody 0” in the .htaccess file used by WordPress.

Now when I enable mod_security, I get 500 error, I disabled mod_seurity for the file upload PHP script used by WordPress by editing the Apache VirtualHost entry of the website and adding

Leave a Reply

Your email address will not be published. Required fields are marked *