Support » Plugin: WooCommerce » WP 5.0.1 breaks WooCommerce csv import?

  • Resolved csilvasuperiortext


    Yesterday I began importing a list of product csv’s to WooCommerce and everything was going fine. Today when I got in, I updated to WordPress 5.0.1 and now the importer does not work and gives and error of:
    “Sorry, this file type is not permitted for security reasons.”
    Is this a known bug with WordPress 5.0.1 and WooCommerce 3.5.2? Anyone know of a solution? Need to get these products imported!

Viewing 15 replies - 16 through 30 (of 37 total)
  • linuxhombr3


    Disable Real MIME Check test unfortunately failed as well.

    Example just showing that the fields will be refused for mapping / that this is not unique to us at the moment, even after installing the MIME check plugin.

    Thanks in advance @ryanr14

    • This reply was modified 11 months ago by linuxhombr3.


    Also, I can tell you this:

    + The MU-PLUGIN solution did also not work. Seems to be a deeeeeeep core issue.

    Any idea if the announcement was made RE release? I know they usually don’t say much leading-up to the fix.



    Using the plugin “Disable Real Mime Check” worked for me as well. Hooray temporary fix!

    @ryanr14 Solution worked perfectly

    i use WP 5.0.2 and had problem importing my products with CSV file.

    i have a same problem :X
    When I load sample_products CSV file.
    Show me that

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

    How can I do this problem?

    Getting same problem – have installed the plugin mentioned and getting the client to test it out now. However, this is a major problem which woocommerce need to address in the next update – hopefully….

    Renaming to .txt works for me, not sure why it didn’t work for @linuxhombr3

    Make sure to rename the actual extension and not just the file name.

    Under Windows isn’t very intuitive, google it.

    The Comma separated .csv file is just a text file without any additions from the editor therefore it can be imported in Woocommerce.

    WooCommerce is asking for a “CSV” file (not file with .csv extension) so in this case it means any format of file as long as it contains Comma Separated Values, I guess.

    • This reply was modified 10 months, 3 weeks ago by Archimedesign.

    Hi all- I was having this same issue and found that using the plugin “Disable Real Mime Check” worked and solved the issue (at least as a hack / fix).

    Thanks for all the suggestions,

    Plugin Support Con Schneider


    Automattic Happiness Engineer

    Howdy everyone,

    Thank you for your participation and posting fixes and workarounds.
    I am marking this as resolved, but feel free to follow up or open a new thread anytime.

    None of this works…..any new ideas?



    Hi guys. I am using wordpress 5.0.3 and woocommerce 3.5.5 and i still get this issue and im exporting from woocommerce and im trying to import the same file i export from woocommerce how is this possible the woocommerce export should be the exact file you need to upload it does not make any sense.
    And i need this because i want to add my products on my testing site and after that just import them in my live site.

    Hi everyone!

    There is another one cause and a solution for it.
    Using define(‘ALLOW_UNFILTERED_UPLOADS’, true); isn’t a good practice so we need to look deeper.

    I’ve found out that, in some cases, php extension fileinfo works not good enough and cannot determine MIME of csv files properly.

    In that case I use next recipe:
    1. Go to wordpress/wp-includes/functions.php
    2. Find finfo_open( FILEINFO_MIME_TYPE );
    3. Enrich it with a path to a magic database (details) and get something like $finfo = finfo_open( FILEINFO_MIME_TYPE, '/usr/share/misc/magic' );
    4. Add if block if ( false === $real_mime ) $real_mime = 'text/plain'; after finfo_close( $finfo );

    This solution works only if php extension on your hosting works improperly.
    If you have another cause of issue, it won’t work

    And also because it is a core hack you need to add it again after each update.

    I am using WordPress 5.1, Woocommerce 3.5.5, all theme and plugins are updated to latest versions. But I am still getting the same error that this file type is not permitted for security reasons, when trying to import a csv file into WooCommerce.

    I have deactivated all plugins except WooCommerce but still get this error.

    I thought that someone mentioned that this issue was addressed by a later version of WordPress?

    @tgglv hacking WordPress Core seems also a good solution.

    The problem with the mime is a Core Issue then.

    @killua99 I think that problem not in WP Core, but in fileinfo PHP extension.

    Do you think that we need to modify WP Core to fix this?

Viewing 15 replies - 16 through 30 (of 37 total)
  • The topic ‘WP 5.0.1 breaks WooCommerce csv import?’ is closed to new replies.