Fixing The”Sorry, This File Type Is Not Permitted for Security Reasons” Error in WordPress

Not Permitted for Security Reasons

When you upload a new file to your website, WordPress does not support it by default. It gives the error, “Sorry, This File Type Is Not Permitted for Security Reasons.”

WordPress generally limits the file types to be uploaded through your site’s admin, as in images, videos, documents, or audio for security reasons.

This error usually occurs because the file’s MIME type, also known as the “Media type,” is restricted from uploading due to default WordPress settings.

What Causes the “Sorry, This File Type Is Not Permitted for Security Reasons” Error?

The ground reason behind these types of restrictions is to prevent the occurrence of security issues due to file uploading vulnerabilities. These purposeful uploads or accidental uploading of malicious executable files can permanently damage your website. They can allow hackers to access your site or penetrate your server to steal your data.

When this error, Sorry, This File Type Is Not Permitted for Security Reasons, prevents you from uploading unsupported files to your site. At the same time, it also does not allow your users to do so. Without such “roadblocks,” practically anything dangerous con be uploaded to your site, which is a great risk to be taken.

Cut story short, the “Sorry, this file type is not permitted for security reasons” error protects your site and definitely isn’t the worst WordPress error to have encountered. But the errors like media file type not supported, error getting file security, or error source not supported can be resolved for your required files to be uploaded. Let us first see what the base of the issue is. And then get to the solution.

MIME types explained

The reason for the issues mentioned above is that their MIME types are not by default supported by your WordPress website. For that, we need to understand what MIME types are.

MIME stands for Multipurpose Internet Mail Extensions. MIME types are used by browsers and other internet devices to regulate the type of content generally associated with a page.

For instance, if you have a .png file and a .jpeg file on a page, the browser would know by their MIME types to treat both files like images rather than videos or other file types.

By default, WordPress stores a list of registered MIME types in wp-includes/functions.php. But not all recognized MIME types are allowed to be uploaded in the WordPress admin dashboard.

Here are a few file types supported by WordPress by default,

Images:           .jpg, .jpeg, .png, .gif, .ico

Documents: .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)

Audio: .mp3, .m4a, .ogg, .wav

Video: .mp4, .m4v (MPEG-4)

.mov (QuickTime), .wmv (Windows Media Video)

.avi, .mpg, .ogv (Ogg), .3gp (3GPP), .3g2 (3GPP2)

 

How to get rid of, “sorry, this file type is not permitted for security reasons” error?

There are basically three ways to get rid of this error getting file security. You can either,

  • Allow unfiltered uploads via wp-config.php
  • Authorize uploads for additional MIME types via functions.php
  • Authorize uploads for additional MIME types using a plugin

Let us discuss these options about how not to encounter sorry, and this file type is not permitted for security reasons, error.

Allow unfiltered uploads via wp-config.php

This way involves filtrating the code of your website and then editing that code to allow unfiltered uploads so you would not be receiving errors like media file type not supported.

This method allows all file types to be uploaded, but this is the thing to notice here that this can be allowed by administrator-level users only. Our honest opinion is only to add the exact file type which is needed. Plus, we would suggest not to filtrate the website code to get rid of this error; sorry, this file type is not permitted for security reasons. Instead, get this done by a professional or use an easy way instead, downloading a plugin.

Authorize uploads for additional MIME types via functions.php

This method of removing the error, sorry, this file type is not permitted for security reasons, requires you to be code-savvy. This way, you can add the requirements to the currently active theme’s functions.php file.

This requires you to have coding knowledge to resolve issues like media file type not supported or

error getting file security. So if you are not a coding lover person, we will suggest you move on to the next way of getting these errors solved.

Authorize uploads for additional MIME types using a plugin

This is the most commonly used and a rather easier way to get the job done of removing the notification “sorry, this file type is not permitted for security reasons.”

For this, open your website admin panel and go to plugins, there you have to download a plugin that supports uploading files with different MIME types or file extensions. Download that plugin, then activate it. And you are good to go to upload any image, audio, or video of your choice without getting the error “sorry this file type is not permitted for security reasons.”

WordPress plugins for additional MIME types

WordPress provides multiple plugins to upload non-supportive format media files. We will discuss a few here.

  • WP Extra File Types
  • WordPress File Upload
  • File Upload Types
  • FileBird Lite

1. WP Extra File Types

When you download this plugin and activate it, it shows the file type options in the settings in the main menu bar on the left. Go to the settings and click on the “extra file types.”It provides a long list of additional image, audio, and video file types, which can be checked to upload that specific file type.

After selecting that, WordPress would not give any error like, sorry this file type is not permitted for security reasons, as this plugin will take care of the security issues. Hence the uploading will be smoothly allowed.

Pricing: Free

Download Link

2. WordPress File Upload

This plugin has to be downloaded the same way from the “add new” tab of “plugins” in the main menu. After activating the plugin, go to the settings, and there would be a new tab in the drop-down menu with the title “WordPress file upload.” Select that for further settings.

WordPress File Upload is a simple plugin that you can use to allow file uploads on your website. The plugin offers a shortcode that you can use to enable file upload on multiple pages, posts, or accept files from your site’s sidebar, without the occurrence of any error like error source not supported.

Download Link

Ratings: 4.5 Stars

Active Installations: 30,000+

Pricing: Free

3. File Upload Types

This plugin easily allows WordPress to accept and upload any file type extension or MIME type, including custom file types.

This also provides the selection menu of file types after going into the “setting” from the main menu bar and then into the “File upload types.” There you can select from the given list of file types or add any other file type in the “add custom file type” and get it easily uploaded, without having any error like media file type not supported, error getting file security, or error source not supported.

Download Link

Ratings: 5 Stars

Active Installations: 8000+

Pricing: Free

4. FileBird Lite

FileBird allows you to create virtual folders to categorize your WordPress media file uploads. So when you move files and folders, that won’t break permalinks to your images in the content. Hence you won’t see an error, media file type not supported, error getting file security, or error source not supported.

Simply add a ‘FileBird Gallery’ block into your page/post composer and choose the folder(s) you want to show. All media files in the folder(s) chosen will be automatically displayed in your post. With this tool in hand, you can manage and arrange thousands of images, audio, videos, and other files in your media library.

Download Link

Ratings: 4.5 Stars

Active Installations: 90,000+

Pricing: $25 (Premium Version)

Conclusion

We have discussed the possible solution of not getting the errors like,

  1. “sorry, this file type is not permitted for security reasons.”
  2. media file type not supported
  3. error getting file security
  4. error source not supported

and a few of the many plugins that can be downloaded to avoid above mentioned errors. WordPress provides many other plugins designed to avoid such errors and allow the smooth uploading of any file type.