Why Failed upload File WordPress and this Error Message Appears?

Have you recently tried uploading a file to WordPress, but then got an error message: Sorry, this file type is not supported for security reasons? The good news is, you are not alone. This error is one of the most common errors encountered by users. This is what prompted us to write this tutorial for you. In this WordPress tutorial, we will cover more about the Sorry, this file type is not permitted for security reasons error, and how to fix it.

What you need

Before starting this tutorial, you will need:

  • Access to the WordPress admin area
  • Access to WordPress files via FTP client or File Manager.

Why is the Error Message “Sorry, This File Type is Not Permitted for Security Reasons” Appear?

If you try to upload a file in a different format than the allowed formats, you will get this error message. By default, WordPress allows you to upload images in .gif, .png, .jpg, and .jpeg formats; documents in .xls and .xlsx, .pdf, .ppt, .pptx, .pps and .ppsx, .doc and .docx, and .odt formats; audio in .flv, .mp3, .m4v, .wma, .m4a, .mid, .ogg, .mp4, .wma and .mid formats; and videos in .ogv, .mp4, .3gp, .m4v, .avi, .mov, .3g2, .webm, .wmv and .mpg formats. Apart from that, other file formats, such as .zip and .key, are also allowed to be uploaded. Therefore, if you try to upload a file in a different format than the aforementioned format, WordPress will display this error message. Let’s see how far we can go about getting around this error message.

Also Read:  Best Ways to Improve Wordpress Security

Overcoming the Error “Sorry, This File Type is Not Supported for Security Reasons”

Using a WordPress Plugin

This error can be easily resolved using a WordPress plugin. There are many plugins that you can use. For example, the Pro Mime Types plugin. The advantage of this plugin is that it can be used for both one site and multiple sites (multisite).

You only need to do this:

  • Install the plugin and activate it.
  • Go to Settings -> Mime Type Settings.
  • Add a value mime type for the file extension you want to upload. You will find all the mime types here. Mime types must be added in a specific format. For example, to allow an .abiword file to be uploaded, you must add the following line:

    AbiWord = application / x-abiword

    After that, click on the Save button. A new mime type will appear below the list and will be colored red.

By editing the wp-config.php file

If the plugins above can’t solve this error, then you can try another way, namely editing the wp-config.php file so that you can upload all file extensions.

  1. Hubungkan website Anda menggunakan aplikasi FTP client atau File Manager.
  2. Buka direktori instalasi WordPress dan cari file wp-config.php agar Anda dapat mulai mengedit.
  3. Tempel (paste) baris kode berikut ini ke mana saja di atas baris yang memuat notifikasi ‘That’s all, stop editing! Happy blogging’:

Contacting Your Hosting Provider

If you have tried all of the methods mentioned above but did not resolve this error, then you should contact your hosting provider. Sometimes, hosting providers restrict certain file formats to provide guaranteed security.

 

 

Also Read:  How to Add Dark Mode to Wordpress Site

One comment

Leave a Reply