How To Fix Restricted Upload Error In WordPress?

Sometimes an error is experienced when you try uploading a new file in your WordPress media library. The error message is – “Sorry, this file type is not permitted for security reasons.”

The reason behind this restriction is to prevent the accidental or purposeful upload of maliciously executable files as that could damage your website.

However, if you are certain about the filetype you are trying to upload then you can fix this issue yourself.

Add this code in the wp-config.php file (located in the WordPress root directory):

define(‘ALLOW_UNFILTERED_UPLOADS’, true);

Alternatively, you may use a plugin called Remove Unrestricted Uploads. Simply install-activate it to enable unfiltered uploads.

However, the given plugin has certain limitations and does not always work. In-case, if it doesn’t work for your specific file-type then try another plugin called Enhanced Media Library.

Install-activate it and then visit Settings -> MIME Types -> Media page.

See whether your desired file-type is listed or not. If it is not listed, click the ‘Add New MIME Type’ button and type the extension details.

In-case, if you don’t know the name and the label of your file-type extension, you can easily find it from here.

Next, tick the ‘Allow Upload’ box for the new MIME type you have added and save your changes.

Leave a Reply

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