WordpressResourcesWooCommerce

How to Fix “Sorry, This File Type Is Not Permitted for Security Reasons” Error in WordPress & WooCommerce

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

Image Types

  • JPG
  • JPEG
  • PNG
  • GIF
  • ICO

Video Types

  • .mp4
  • .mov
  • .m4v
  • .wmv
  • .avi
  • .mpg
  • .ogv
  • .3gp .3g2

Document Types

  • .doc .docx
  • .pdf
  • .ppt .pptx .ppsx
  • .odt
  • .xls .xlsx

Audio Types

  • .mp3
  • .m4a
  • .ogg
  • .wav

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

  1. During Adding Media files from Media Upload Screen
  2. 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.

Navigate to wp-config.php
Navigate to wp-config.php

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

define('ALLOW_UNFILTERED_UPLOADS', true);
ALLOW_UNFILTERED_UPLOADS

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.

Tags
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close