Do you need to upload files to your website that are normally not supported by WordPress?
You can upload many common file types in WordPress, including images, videos, audio files, and office files. However, some website owners need to upload files that are unsupported.
In this article, we’ll show you how you can add additional file types for upload in WordPress.
Which File Types Are Allowed for Upload in WordPress?
By default, the allowed file types and extensions are:
Images: .jpg, .jpeg, .png, .gif, .ico
Documents: .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .PSD
Audio: .mp3, .m4a, .ogg, .wav
Video: .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2
However, some file types have the potential to be misused and can be a security risk, so WordPress doesn’t enable them by default:
Images such as .svg, .bmp
Documents like .psd, .ai, .pages
Code files such as .css, .js, .json
Video like .flv, .f4l, .qt
If you try to upload unsupported file types to your WordPress website, then you will see the error message, ‘Sorry, you are not allowed to upload this file type.’
But what if you need to upload an unsupported file type? You could upload the files through FTP or your WordPress host’s file manager, but that’s not as convenient as using the built-in WordPress media library or a file upload form.
Let’s take a look at how to add additional file types to be uploaded in WordPress.
How to Add Additional File Types to be Uploaded in WordPress
Using Preset File Types
Upon activation, go to the Settings » File Upload Types page in your WordPress admin area. Then, simply scroll through the list of preset file types, or enter a file type into the search box.
Next, check the boxes next to the file types that you want to enable.
Once you’re finished, you need to click the ‘Save Settings’ button at the bottom of the screen to store your changes.
Now you will be able to upload those file types using the WordPress media library.
Adding Custom File Types
If the file type you want to add wasn’t included in the list of presets, then you can add it as a custom file type.
When you scroll down to the bottom of the File Upload Types screen, you will come to a section labeled ‘Add Custom File Types’. Here you can add a file type by entering a description, MIME type, and file extension.
To add another custom file type, simply click the ‘+’ icon at the end of the line. When you’re done, don’t forget to click on the ‘Save Settings’ button to store your changes.
For example, if you wish to add the YAML file type, then you would type ‘YAML file’ in the description, ‘text/yaml’ in the MIME type field, and ‘.yaml’ as the file extension.
MIME (‘Multipurpose Internet Mail Extension’) is a standard way to identify files on the web. The easiest way to learn a file’s MIME type is to use a MIME File Type Checker.
We hope this tutorial helped you learn how to add additional file types to be uploaded in WordPress. You may also want to learn how to create a file upload form in WordPress, or check out our list of the best Instagram WordPress plugins.