By default, WordPress limits the type of files that you can upload for security reasons.
There are specific file types that WordPress has been configured to support by default.
The defaults files supported include:
Images: jpg, jpeg, png, gif, and ico
Videos: mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, and 3g2
Documents: pdf, doc, ppt, pptx, pps, ppsx, odt, xls, xlsx, and psd
Audio: mp3, m4a, ogg, and wav
Any attempts to upload a file that is not listed above will result in a “Sorry, This File Type Is Not Permitted for Security Reasons” error message.
WordPress File Type Not Permitted Error Message
The error is triggered when a user unknowingly tries to upload a file format that is not supported by the WordPress site configuration settings.
For instance, you could be attempting to upload a custom font file in .tff and/or .woff formats, which are not supported by default, triggering the error message.
Nevertheless, you can force your WordPress site to allow file formats not permitted by default by either:
- Editing your site’s configuration (wp-config.php) file
- Installing a WordPress Plugin
Permitting More File Types Using wp-config.php
The WordPress configuration file (wp-config.php) is a very important file for all self-hosted WordPress websites. This file is located in the root of your WordPress file directory and stores your website’s configuration details.
What better place to change the WordPress configuration setting than with the wp-config.php file.
Since you are going to edit this file also make sure to check out how to edit the WordPress configuration file (wp-config.php).
Once you can comfortably edit the wp-config.php file, proceed to add the following code snippet above the
/* That’s all, stop editing! Happy blogging. */ line:
Once the changes are saved, you’ll be able to upload any file type to your WordPress Media Library.
However, you’ll first need to log out of your WordPress account then immediately log back in to finish the process.
The good thing with WordPress is that there is always a chance that there is a plugin to fix a problem.
There are several plugins to resolve the “Sorry, This File Type Is Not Permitted for Security Reasons” error message.
WP Extra File Types
For this article, we will use the free WP Extra File Types plugin to conveniently manage file types permitted without any need to code.
Navigate to plugins on your WordPress dashboard select add new and search for the WP Extra File Type.
Then install and activate it:
To manage the types of files that you would like to upload go to settings and select the Extra File Types.
You can then check the box next to the file type(s) that you want your WordPress dashboard to allow for upload:
Add Custom File Types
You can also add your own custom file types at the bottom of the list:
That’s about it on how to manage the types of files that can be uploaded to your WordPress site.