As a WordPress user, there will come a time when you need to upload some types of files to your website.
Maybe you’re making a website that let users download files or maybe you want to add a downloadable incentive to your email optin form.
However, soon you’ll discover that WordPress actually don’t like it when you upload specific types of files. If you try to upload a file that WordPress doesn’t like, you will get an error saying “Sorry, This File Type Is Not Permitted For Security Reasons”
Thankfully, there’s an easy fix for this problem and we’re going to walk you through it, step by step.
First of all, this is a common error for most bloggers and WordPress users. So, don’t be alarmed or panic. The issue can also be easily fixed.
WordPress’ own system is to blame for this error. Even though WordPress is a content management system, it still has a very strict filtering system for accepting only a select few types of files into the system.
And, when you trying to upload a file that’s not in WordPress’ supported files list, you’ll encounter the “Sorry, This File Type Is Not Permitted For Security Reasons” error.
As you know there are many different types of files used by different types of applications. For example, .AI is a very common file type used by Adobe Illustrator.
This file type is widely used by designers and illustrators to save and share their work. But, don’t be surprised if you get a “Sorry, This File Type Is Not Permitted For Security Reasons” error when trying to upload an .AI file to WordPress because the file type is not in WordPress’ supported files list.
This is the full list of file types allowed in WordPress by default.
It’s baffling that WordPress still doesn’t support popular and common file types like Illustrator by default. And it’s only one of the dozens of file types that WordPress still doesn’t support.
So yes, this time you can blame WordPress for putting you through this confusing error. But, you can fix this issue manually to upload any file type you want.
There are two simple ways to fix the “Sorry, This File Type Is Not Permitted For Security Reasons” error. One method required using a plugin and the other requires editing a core WordPress file.
Before you proceed we highly recommend that you backup your website. If you don’t have a backup system yet, you can set it up using a free plugin.
There are several mime types plugins that help you add your own file types to the WordPress supported files list, like Pro Mime Types, Mime Types Extended, and Unsafe Mimetypes. Unfortunately, most of these plugins are outdated.
We’re using the WP Add Mime Types plugin for the tutorial since it’s been updated to support the latest WordPress versions. Feel free to try and use a different plugin if you prefer.
To Install the plugin, login to your WordPress dashboard and go to Plugins >> Add New.
Search for the WP Add Mime Types plugin and click the Install and then Activate buttons to enable the plugin.
After the installation, a new page will appear in the Settings page called Mime Type Settings. From this page, you can add certain file types to add them to the WordPress system.
Search for the file type you want to add and copy-paste it into the Add Values box. Make sure that you copy the entire line related to the file type extension you’re trying to add.
Then click on the Save button to save the changes. Once the file type is enabled, it will be highlighted in color red on the list.
The only issue with this method is that even the mime type plugins have limits when it comes to adding certain file types. For example, the plugin doesn’t allow uploading of .AI files. But, the second method lets you avoid that problem and upload any file you want.
WP-Config.php is a core file used by WordPress that handles many of WordPress functionality. You can edit this file to disable the system that prevents uploading of certain file types. After that, you’ll be able to upload any file type you want.
You can edit the WP-Config file by using an FTP client app or by logging into your server CPanel and using the File Manager.
Navigate to the public folder where your WordPress website is hosted and where all the WordPress core files are located.
Then open and edit the WP-Config file.
Once you have the file opened, simply search for the term /* That’s all, stop editing! Happy blogging. */
Then paste the following line of code right above it
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
That’s it!
The above methods should do the trick to help you upload almost any type of file you want in WordPress. However, if you still get the same error you should try contacting your hosting provider and seek their help.
Some web hosts prevent certain types of files being uploaded for security reasons. If you keep getting the error and you desperately need to upload the file in WordPress, contact the hosting provider’s customer support and see if they have some filters preventing you from uploading any files.
SeedProd is one of the elders of the WordPress ecosystem. It's also a bit of…
Really Simple Syndication (RSS) feeds are a vital component of the WordPress ecosystem. They act…
It’s that time of year again when people start revving up their shopping lists, hunting…
If you clicked on this post, I’m guessing you want to find the best solution…
Trying to figure out how to start an online course so that you can share…
Considering using Teachable to create an online course? In our hands-on Teachable review, we'll help…