Support » Fixing WordPress » Uploading .doc and .docx document not allowed

  • I’ve started a WordPress account on which I need to upload Word documents. But as I try to upload them, I’m not able to do it. I get a message that because of security reasons, this type of format is not permitted for uploading. I’ve tried both .doc and .docx documents. I also uploaded a pdf-file without any problems. The manual specifically says that Word documents are supported by WordPress. Does anybody know a solution for this problem? It’s pretty critical for my progression at my study/school that I upload the necessary documents to go on a assessment.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • That’s strange, I think Word docs are permitted by default so it’s possible that your host has stopped it, in which case this solution may not work. But you can try adding a function to your theme (or create a small custom plugin for your site customisation functions):

    add_filter('upload_mimes','doublee_add_custom_mime_types');
    function doublee_add_custom_mime_types($mimes){
    	return array_merge($mimes,array (
    		'doc' => 'application/msword',
    		'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    	));
    }

    For anyone who comes across this thread and needs other MIME types, there’s a great list here: https://paulund.co.uk/change-wordpress-upload-mime-types

Viewing 1 replies (of 1 total)
  • The topic ‘Uploading .doc and .docx document not allowed’ is closed to new replies.