Sometimes you may want to upload files other than images and videos to your WordPress site. By default, WordPress supports uploading only a limited number of file types for security reasons. If you try to upload some uncommon file extensions, you will run into the error:
Sorry, this file type is not permitted for security reasons. In this article, I will guide you how you can upload any types of files to your WordPress site. Read on to learn more..
Table of Contents
How to Upload Files on WordPress?
First of all, let us look into how to upload files to WordPress. There are two main ways to upload anything to WordPress:
1. Upload using File Block in the Editor
Files can be directly uploaded within the Editor screen when of Posts or Pages. Go to Pages or Posts > Add New and click on + icon to add the File Block.
Once you add the File Block, click on Upload button or on Media Library to select files that are already uploaded to the site.
2. Upload Through Media Library
Another way to upload files to your WordPress site is by clicking on Media on the left sidebar and then click on Add New.
Supported Files on WordPress
The files that can be uploaded to your site can also depend on file types allowed by your web host. It is possible that your web host or server settings might prevent uploading of certain file extensions. Anyhow, by default WordPress supports uploading of following file extensions:
- .pdf (Portable Document Format; Adobe Acrobat)
- .doc, .docx (Microsoft Word Document)
- .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation)
- .odt (OpenDocument Text Document)
- .xls, .xlsx (Microsoft Excel Document)
- .psd (Adobe Photoshop Document)
- .mp4, .m4v (MPEG-4)
- .mov (QuickTime)
- .wmv (Windows Media Video)
- .ogv (Ogg)
- .3gp (3GPP)
- .3g2 (3GPP2)
If you try to upload any other types of files or file extensions, you will encounter the following error:
To Upload Additional File Types on WordPress
The fix for the above error is pretty easy. If your web host or the server on which the site is hosted does not limits uploads, you can install the plugin WP Extra File Types.
This plugin can be downloaded for free from here: https://wordpress.org/plugins/wp-extra-file-types/
Once you install and activate this plugin, go to Settings > Extra File Types to access the settings of the plugin.
By default, the plugin comes with details of over a hundred file extensions. If the type of file that you are trying to upload is listed there, mark the checkbox corresponding to it and save the changes. Once the changes are done, go back to the Editor and try uploading the file again, it will work fine.
Don’t worry if the file extension that you are looking to upload is not listed there. The plugin also supports addition of custom file types.
Add Custom File Types on WP Extra File Types Plugins
Suppose you wish to upload a file with extension such as
.afdesign. This file extension is not listed in WP Extra File Types plugin.
To add details of this file extension, scroll down to the bottom of the plugin settings and press on + icon.
You can give a Description related to the file type for future reference.
.afdesign is a file extension related to the software Affinity Designer.
Then add the File Extension and Mime Type of this particular file type. To find out the Mime Type of the file, you can use the website: https://datatypes.net/
I hope this article gave you an insight on how to add support for uploading of any file types or extensions to your WordPress site. If you have any questions, feel free to write to me in the comments.