Brand new to WordPress. Using it from GoDaddy and when I try to upload my video .mov file (it's only 10MB) I get an error saying it's not a valid media type. Any ideas? Thanks.
-
try some other format videos.– KarunCommented Jul 1, 2015 at 19:59
-
1IMO, I wouldn't upload videos directly into WP, using a provider ( vimeo, youtube, etc ) is usually faster and more reliable in the long run.– Howdy_McGee ♦Commented Jul 1, 2015 at 20:11
-
2If you are hosting with GoDaddy's WP plan, it's possible that they block certain formats for their own sake. So first, I would check if .mov is listed as an allowed mime type. See the codex on how to get that list -> codex.wordpress.org/Function_Reference/get_allowed_mime_types– gdanielCommented Aug 9, 2017 at 14:17
Add a comment
|
2 Answers
You can use upload_mimes
filter and add mime for .mov files (video/quicktime
).
add_filter( 'upload_mimes', 'customizeMimeTypes', 10, 1 );
function customizeMimeTypes( $mimeTypes) {
$mimeTypes['mov'] = 'video/quicktime';
return $mimeTypes;
}
If you want to embed video with media library you can use wp_video_extensions
filter.
add_filter( 'wp_video_extensions', 'addMovToWPVideo');
function addMovToWPVideo( $extensions ) {
$extensions [] = 'mov';
return $extensions ;
}
More info:
https://developer.wordpress.org/reference/hooks/wp_video_extensions/ https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
Hope this helps you!
Note: check php max upload file size in php.ini too!
-
That's not the case here, that user was able to upload a .mov file, but this user isn't. Else this question would be closed as a duplicate– Tom J Nowell ♦Commented Apr 29, 2017 at 18:50