The error message "sorry, this file type is not permitted for security reasons" appears when you try to upload the media file, which is not allowed by default in WordPress. This is a security measure set for preventing the User from the risk of security breaches and cyber attract by restricting the users from uploading the potentially harmful file to the website.
However, there are several ways to upload files not supported by WordPress by altering the WordPress setting or with the help of the plugins.
Here are some of the methods to fix the "Sorry, this file type is not permitted for security reasons" Error:
1. Check file extension:
The file type you are trying to upload may change the extension accidentally. That's the reason why you where see the error. So check if the file extension is incorrect. Then you just need to correct the format of the file format and upload the file.
For that, Log into your WordPress Dashboard and click on File manager. and locate the targeted file.
Right-click upon it and rename the File.
2. Edit wp-config.php file:
The following line of Code must be uploaded to permit any file type.
First, Login to your Cpanel and navigate to the File Manager option, and from left- the hand side, click to open the public_html folder.
Select the wp_config file, right-click, and edit the file.
Add the above code to that file and save the changes to allow uploading the new file type.
3. Edit the Theme functional PHP file:
For that, navigate to the wp-content folder from the File manager.
Open your Theme folder functional.php file and click on edit.
Open Theme Add the following code to the File:
You can change the MIME to change the file type depending on the file type you want to upload.
4. Use a plugin to permit the file:
If you are not comfortable with coding, you can also do the task with the help of a plugin.
You can use WP Add Mime types plugin to install & activate the plugin.
After activating the plugin, navigate to the setting >> Mime Type Settings in your WordPress dashboard.
In the Add values section, add your desired file type as below.
Once it's done, save your changes and try uploading the Image of that type.