Uploading a Media file to WordPress or Importing Products with CSV in WooCommerce and suddenly WordPress says sorry to you ? The message typically looks like this
[filename] has failed to upload. Sorry, This File Type Is Not Permitted for Security Reasons
Well tension not, Wordpress says sorry for your website safety. By default WordPress limits the File types you can upload. By Default These are the file-types that are supported in WordPress upload
- .3gp .3g2
- .doc .docx
- .ppt .pptx .ppsx
- .xls .xlsx
If you are trying to upload file types that are not listed above WordPress may show the security error.
What Triggers the error ?
By default it triggers from two upload screen
- During Adding Media files from Media Upload Screen
- During Importing WooCommerce Products via .csv file
How to Fix Error : “Sorry, This File Type Is Not Permitted for Security Reasons”
Navigate to wp-config.php file in your WordPress main Directory via file-manager from cPanel or via FTP.
Open the file in editor (notepad++ is preferred) and the below code anywhere in the file. Its better to add it with a note for future reference
Save the file , if you using FTP upload and replace the file. Now try uploading the error should be fixed
You can also used 3rd-party plugin to add the permission for file types. But its prefer to stick to basic solution. Additional plugin may slowdown the site performance.