If you’re facing the “Sorry, this file type is not permitted for security reasons” error in WordPress, and none of the standard solutions have worked for you, there is another option you can try. You can add a line of code to your wp-config.php file that will allow unfiltered uploads. Here’s how to do it:
- Log in to your WordPress site and go to the root folder of your website.
- Find the wp-config.php file and open it in a text editor.
- Add the following line of code to the file, preferably just above the “/* That’s all, stop editing! Happy blogging. */” line:
define( 'ALLOW_UNFILTERED_UPLOADS', true );
- Save the file and re-upload it to your server, overwriting the original file.
Once you’ve added this line of code and saved the file, you should be able to upload any file type to your WordPress site without encountering the “Sorry, this file type is not permitted for security reasons” error.
However, it’s important to note that allowing unfiltered uploads can be a security risk, as it removes some of the built-in security features of WordPress. So, use this solution with caution and only if you know what you’re doing.
In summary, if you need to allow unfiltered uploads in WordPress, you can add the line “define( ‘ALLOW_UNFILTERED_UPLOADS’, true );” to your wp-config.php file. This should allow you to upload any file type without encountering the “Sorry, this file type is not permitted for security reasons” error. But keep in mind that this can be a security risk, so use it with caution.