WordPress: Upload Blocked File Extensions Without a Plugin

This is not for a novice, you should have a little experience in PHP and know what the .htaccess file does. If you are new and want to edit these files make sure to create a backup file in case you bring down your WordPress site.

It took me an hour to figure this out, I do not like to overload WordPress with plugins for things I can do myself.

To many plugins can slow your system, open security holes and add external links to places you do not want your visitors to visit. Hopefully you found my post before wasting an hour of your time to come to the same solution.

I recently wanted to share additional files beside the basic extensions that WordPress allows you to use, i.e.  doc, jpg, mpg… I tried editing my .htacess file a few time with no results. Then I found a post that referenced the “wp-includes/funtions.php”. From the functions.php I made 2 changes in the same file.

  1. ,  'vsd' ),WordPress Funtions.php file

 

  1.            'vsd' => 'application/msvisio',functions.php

That is all I had to do to upload visio files with the “vsd” extension.

If it does not work for you, try adding access through the root .htaccess file as well.

# additional mimetypes
    AddType application/visio .vsd
    AddType application/x-visio .vsd
    AddType application/vnd.visio .vsd
    AddType application/visio.drawing .vsd
    AddType application/vsd .vsd
    AddType application/x-vsd .vsd
    AddType image/x-vsd .vsd

Good luck,

Adam M. Erickson