Skip to main content

How To Fix ‘Sorry, This File Type Is Not Permitted For Security Reasons’ WordPress Error

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.

What Is ‘Sorry, This File Type Is Not Permitted For Security Reasons’ Error?

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.

Sorry, This File Type Is Not Permitted For Security Reasons error

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.

What Causes This 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.

wordpress supported file types

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.

How To Fix The Error

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.

Method 1: Use A Mime Types 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.

Step 1: Install WP Add Mime Types Plugin

To Install the plugin, login to your WordPress dashboard and go to Plugins >> Add New.

install wp mime types plugin - 1

Search for the WP Add Mime Types plugin and click the Install and then Activate buttons to enable the plugin.

Step 2: Customize 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.

install wp mime types plugin - 2

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.

install wp mime types plugin - 3

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.

Method 2: Edit WP-Config File

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.

Step 1: Access Your Server

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.

Step 2: Edit WP-Config.php

Then open and edit the WP-Config file.

edit-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


edit-wp-config file - 2

That’s it!

Still Getting The Same Error?

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.

WordPress Design, WordPress Development, cPanel Hosting, Web Design, Web Development, Graphic Design, Mobile Development, Search Engine Optimization (SEO) and more.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.