Sometimes in WordPress site you try to upload file and got the error message “Sorry, this file type is not permitted for security reasons.” as shown in the following screenshots which results in not allowing you to upload that file.

This happens because by default WordPress allows users to upload only any of the following file types and if you try to upload any other file types then you get the error message “Sorry, this file type is not permitted for security reasons.”.

Images :

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)

Audio :

Video :
.mp4, .m4v (MPEG-4)
.mov (QuickTime)
.wmv (Windows Media Video)
.ogv (Ogg)
.3gp (3GPP)
.3g2 (3GPP2)

Others :

To allow file types to upload other than listed above, you can fix this issue using any of the following various ways.

Fix The Issue Using WordPress Multisite Settings

If you are using WordPress Multisite then you can add the file type that you want to upload in the “Upload file types” option of WordPress Multisite Upload Settings in network admin area on the following path as shown in the below screenshot.

Network Admin Area -> Settings -> Upload Settings


Fix The Issue Using WordPress Plugins

You can use any of the following plugins on your site and configure it to allow to upload file types on your site.

WP Add Mime Types

Mime Types Extended

Unsafe Mimetypes

Mime Types Plus

Fix The Issue To Allow To Upload All File Types In File Upload

You can set the WordPress constant ALLOW_UNFILTERED_UPLOADS to true that will allow you to upload all file types on your WordPress site.

To set ALLOW_UNFILTERED_UPLOADS constant to true just add the following line of code in the wp-config.php file of your WordPress install which you will find in the root directory of your WordPress setup.


You can add the above line of code in the wp-config.php file just above the following statement.

/* That's all, stop editing! Happy blogging. */

If you don’t want to edit the file wp-config.php then just download this Free WP TP Plugin and install it on your site. This plugin contains the following code.

Plugin Name: Free WP TP Plugin
Description: Quick Custom Solution Plugin for Implementing Custom Solution.
Version: 1.0.0
Author: Movin
Author URI:
License: GNU General Public License (Version 2 - GPLv2)

Fix The Issue To Allow To Upload Specific File Type In File Upload

If you want to allow specific file types to upload and not all file types as above or want to forbid specific file types then you can use the following code in the functions.php file of your child theme or use the Free WP TP Plugin and replace the code in its file freewptp-plugin.php on line 12 with the below code.

function free_wp_tp_enable_extended_upload ( $mime_types =array() ) {
   // The MIME types listed here will be allowed in the media library.
   // You can add as many MIME types as you want.
   $mime_types['gz']  = 'application/x-gzip';
   // If you want to forbid specific file types which are otherwise allowed,
   // specify them here.  You can add as many as possible.
   unset( $mime_types['bin'] );
   return $mime_types;
add_filter('upload_mimes', 'free_wp_tp_enable_extended_upload');

Please change the above code with correct file types according to your need.

Fix The Issue By Contacting Web Host

If your issue doesn’t fix using any of the above solutions then this can be your web host issue as many hosts don’t support various types of files to upload on server due to security issue so you can contact your web host to resolve it.

I hope you find this free tutorial helpful but if you have any questions regarding fixing this issue.


Please enter your comment!
Please enter your name here