• Resolved ita21

    (@ita21)


    Hello,

    I am trying to import a csv file which contains products info, but I am getting this error:

    Sorry, this file type is not permitted for security reasons.

    I read online some possible solutions
    – using Disable Real MIME Check plugin
    – adding “define( ‘ALLOW_UNFILTERED_UPLOADS’, true );” within the wp-config.php

    but this methods are not working,

    Do you have any suggestions what can I do about this issue?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @ita21,

    There are several reasons why this error may occur. You can walkthrough some of the methods that allowed other users to get past the issue.

    • Upload and import a CSV file from FTP
    • If you have access to the FTP of your website, upload the file there and import it using the WooCommerce Product CSV Importer and Exporter tool. To import the CSV file go to Products > Import > Show Advanced Options > Enter the path to a CSV file on your server. You should only add Folder name/File name there.

    • Disable MIME Type Checking by adding a snippet in the php file
    • Try adding the following snippet to the functions.php file on your child theme:

      
      add_filter( 'woocommerce_product_csv_importer_check_import_file_path', '__return_false' );
      

    The error “Sorry, this file type is not permitted for security reasons” may also occur if the import file contains HTML tags. On some servers, this file type can be mis-detected by WordPress. You should then either remove the HTML tags from the CSV file or reach out to your web host for assistance.

    If you would like to read more about this error, please feel free to visit the following link:

    https://docs.woocommerce.com/document/product-csv-importer-exporter/#section-14

    Hope this helps.

    Thread Starter ita21

    (@ita21)

    Hello,

    Thanks for the replay, I tried uploading the file from ftp and when i run the import I got this error:

    Forbidden

    You don’t have permission to access this resource.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    I think that the issue has to do with the fact that the file contains html tags, how can I solve this?

    Mirko P.

    (@rainfallnixfig)

    Hi again,

    I would say very often this error comes out from CSV files containing HTML tags but can you try seeing if the upload works with the Storefront theme active or a default WordPress theme like Twenty Twenty-One and all of your plugins temporarily deactivated except WooCommerce, and let me know if you still see the same error?

    I would suggest doing this test on a staging copy of your site, so your live site isn’t affected by these changes.

    Let me know how it goes.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘CSV import issues’ is closed to new replies.