The “Sorry, This File Type Is Not Permitted for Security Reasons” error and how to fix it

Nadejda

· 15th January 2021·Wordpress Security

Excerpt

You can usually upload most of the common type files in WordPress without any issues. In some cases, however, you might notice that the file type is not supported and an error will occur.

The “Sorry, This File Type Is Not Permitted for Security Reasons” error and how to fix it

You can usually upload most of the common type files in WordPress without any issues. In some cases, however, you might notice that the file type is not supported and an error will occur.

Today we will show you how to fix the “Sorry, This File Type Is Not Permitted for Security Reasons” error.

What is the reason for this error?

Every time you try to upload a file type which is not supported by WordPress you will see this error message.

When trying to upload the file from your media library the message will appear.

File type error

Through the WordPress admin, search on File types are restricted for security reasons. The permitted types include video, images, documents, and audio.

One way to fix the error is by uploading the files using FTP from your WP hosting file manager section.

Bear in mind, that it’s not as easy and user-friendly as using the media library.

File type extension spelling

If the error occurs although you have already previously uploaded this file type without any problems, it is most likely that you have missed-spelt the file extension.

This is a 3 to 4 letter file type suffix which is located at the end of the file name. For example, one file name can be named example.PNG in which case Example is the file name and PNG is the extension.

Such extensions are used by many applications and programs which include WordPress in order to recognise file types.

When the error appears, we recommend checking the file extension and make sure there are no issues with it. In some cases, you might have accidentally deleted part of the name or miss-typed it.

You can easily check the file extension on Windows 10. Open the folder containing your file and click on the view link. After this, check the File name extensions box.

Windows 10

You will now be able to see the extension after filenames.

filenames

For Mac users, locating the extensions happens from the Finder app and clicking on Finder – Preferences.

Preferences

You will then see the Preferences pop-up from where you need to click on the Advanced tab. The box next to Show all file name extensions need to be checked.

Now that all file name extensions are visible, simply locate your file and check that if it has the correct extension.

If there is an error in the extension, simply right click and choose Rename in order to change the file name.

File upload types plugin

If your chosen file type is not supported by WordPress, it can still be uploaded by being added as a supported file type.

With the help of the file upload types plugin you can easily fix the error. The first thing you need to do is install and activate the plugin. After this, go to Settings – File upload types from your admin area. Now, type your file type into the search box.

file upload types

Check the box located next to the file types which you wish to enable and click on Save settings.

enable file types

Return to your media library where you can add your file type without seeing the error message.

error message

How to secure your website when allowing additional file types?

WordPress blocks not supported file types for security reasons. By enabling additional file types, we recommend taking the necessary precautions.

Non-registered users need to be restricted so that they cannot upload additional file types. This could be done with the help of a file upload form.

Make sure you use a security plugin to monitor your website.

Make sure to regularly scan your website for malicious code.

If possible, limit the file size which will stop users from uploading large files which may contain malware.

Add activity logs which will help you track all files uploaded by users.

We hope today’s article was helpful in resolving the “Sorry, This File Type Is Not Permitted for Security Reasons” error. Share your thoughts in the comments below.

Nadejda
Nadejda Milanova

Get 10% off your order

UYD-772-MK5

Enter UYD-772-MK5 at the checkout to get 10% off one-time tasks or any maintenance plan.

Get started