HTTP Error when uploading mp4 video file

This is a repeat issue, but none of the other threads have had a solution that helps me. I am using WordPress 4.7.3 running the Dani theme from Envato. When I try to upload my mp4 video file, I get an HTTP error. I tried uploading images and it did not give me the same HTTP error.

Here is a screenshot of the error:
HTTP error

I have tried the following to fix this issue:

  1. Deactivating all plugins one by one and my current theme
  2. Installing this plugin – https://github.com/getsource/default-to-gd
  3. Adding the following line to .htaccess: SetEnv MAGICK_THREAD_LIMIT 1
  4. Adding the following code to functions.php:

add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}

My php.ini config is also: upload_max_filesize = 200M and post_max_size = 200M. This is large enough to accomodate my video file, so that shouldn’t be the issue.

None of these have solved my issue. Is there something else I can try to fix this? Please let me know! Thanks for the help.

2 Answers
2

In my case the cause was plugin All In One WP Security an its “Basic Firewall Settings”. The above firewall features are applied via your .htaccess file and one if these features is “Limit file upload size (10MB).”

So to make upload of files larger then 10 MB working again you can do following:

1) Go to WP Security / Firewall / Basic firewall rules tab and uncheck “Enable Basic Firewall Protection”. Then Save settings. This will disable all Basic firewall settings and this 10 MB upload limitation as well.

or

2) If you want to keep the basic firewall rules but remove only that limitation, you need to use “Custom Rules”. Go to WP Security / Firewall / Custom rules tab and check “Enable Custom .htaccess Rules:”. Then put in the custom rules text area:

LimitRequestBody 64000000

That will allow approx. 64 MB uploads. Also make sure that “Place custom rules at the top” checkbox is NOT checked, so it overwrites the 10M limit from above.

Leave a Comment