Search code examples
phpwordpresshttpmhtml

Need to Upload mht file format to wordpress site


I have some '.mht' files. I need to upload that file in to my word press site. but when i upload that files, its showing "HTTP ERROR" Error.

Is there any other way to upload '.mht' files to word press site.


Solution

  • You can Upload Additional File Types To Your WordPress Blog using the below code here.

     <?php
     add_filter('upload_mimes', 'custom_upload_mimes');
     function custom_upload_mimes ( $existing_mimes = array() ) {
     // add your extension to the array
     $existing_mimes['ppt'] = 'application/vnd.ms-powerpoint';
     // or: $existing_mimes['ppt|pot|pps'] = 'application/vnd.ms-powerpoint';
     // to add multiple extensions for the same mime type
     // add as many as you like
     // removing existing file types
     unset( $existing_mimes['exe'] );
     // add as many as you like
     // and return the new full result
     return $existing_mimes;
     }
     ?>
    

    So you can add your file formats in this way by using the above code
    For more info Regarding this issue visit this link..
    Default file formats that supports for word press is here..