A Guide to Diversifying File Upload Options in WordPress
Interested in uploading files to your WordPress site that are not natively supported? While WordPress allows for the upload of popular file types such as images, videos, audio files, and office documents, there may be instances where you need to add support for additional file types. In this article, we will walk you through the process of expanding the file upload options in WordPress.
File Types Supported by WordPress
For security reasons, WordPress only permits the uploading of commonly used file types. By default, WordPress accepts the following file types and extensions:
- Images: .jpg, .jpeg, .png, .gif, .ico, .webp
- 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
Pro Tip: To improve your website’s speed and performance, it is recommended to use a video hosting site instead of directly uploading videos to WordPress.
File Types Not Supported by WordPress
WordPress does not provide default support for certain file types due to potential security risks and potential misuse. These unsupported file types include:
- Images: .svg, .bmp
- Documents: .psd, .ai, .pages
- Code files: .css, .js, .json
- Video: .flv, .f4l, .qt
If you attempt to upload an unsupported file type to your WordPress site, you will receive an error message stating, “Sorry, you are not allowed to upload this file type.”
Uploading Unsupported File Types in WordPress
Although it is possible to upload unsupported file types via FTP or your WordPress host’s file manager, it may not be as convenient as using WordPress’s built-in media library or a file upload form.
Using the File Upload Types by WPForms Plugin
To enable support for additional file types in WordPress, you can install and activate the free File Upload Types by WPForms plugin. Follow these steps:
- Install and activate the File Upload Types by WPForms plugin.
- In your WordPress admin area, go to Settings → File Upload Types.
- Scroll through the list of preset file types or use the search box to find the desired file type.
- Select the checkboxes for the file types you want to enable.
- Click the Save Settings button to save your changes.
Once you have completed these steps, you will be able to upload the additional file types using the WordPress media library.
Adding Custom File Types
If the file type you want to add is not included in the preset list, you can manually add it as a custom file type. Follow these steps:
- Scroll to the bottom of the File Upload Types page.
- Locate the section labeled Add Custom File Types.
- Enter a description, MIME type, and file extension for the custom file type.
- To add another custom file type, click the + icon at the end of the line.
- Click the Save Settings button to save your changes.
For example, if you wish to add the YAML file type, fill in the description field with ‘YAML file’, the MIME type field with ‘text/yaml’, and the file extension field with ‘.yaml’.
Pro Tip: You can use a MIME File Type Checker to easily determine the MIME type of a file.
Enhance Your WordPress Website
By expanding the supported file types in your WordPress site, you can enhance its functionality. Whether you need to upload unique file types for your specific requirements or provide more options to your users, this guide has you covered.