2

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.

  • What exactly is the error? – Nathan Powell Mar 16 '17 at 22:34
  • @NathanPowell it just says 'HTTP error.' I added a screenshot above. – Liz Mar 16 '17 at 22:38
  • Does the error happen when clicking select files as well as drag and drop? Also, does it happen on any file? – Nathan Powell Mar 16 '17 at 22:42
  • Hi @NathanPowell. The error only seems to be with a larger mp4 file (164.6 MB). I tried drag and drop and select and it didn't work for either. I just tried to upload an image via select and drag and drop and it worked for both. – Liz Mar 16 '17 at 22:45
  • I see, it's possible that your .htaccess has a max file size set. Another thing would be any timeout type settings on the hosts end. – Nathan Powell Mar 16 '17 at 22:49
3

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.

1

There is a file size limit on mp4 files.

If you reduce the file size the upload will succeed.

I'm not sure how to increase the mp4 upload size.

protected by Community Jan 18 at 8:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.