WooCommerce import error: "Invalid file type. The importer supports CSV and TXT file formats."

What it means: WooCommerce's product importer only opens files that end in .csv or .txt. This exact message appears when you enter the path of a file already on your server (under "Show advanced options") and that file is not .csv or .txt. On a normal upload from your computer, WordPress refuses such a file first, with "Sorry, you are not allowed to upload this file type." A file that WordPress lets through but WooCommerce still rejects gets "Invalid file type for a CSV import."

Find the rows in your file

WooCommerce product import

The product CSV you are about to import into WooCommerce (Products, Import), or the one that just failed.

Your file stays on this device

It is read and converted by this page, inside your browser. Nothing from the file is uploaded, and the tool keeps working offline once the page has loaded.

Loading the converter...

How to fix it

  1. Open the file in your spreadsheet program and save or download it as CSV (choose "CSV UTF-8" if it is offered).
  2. Check that the file name ends in .csv, not .csv.xlsx or .numbers, including the path you typed under "Show advanced options".
  3. Upload the new .csv file on Products, Import.

Example

A file with this problem (named products.xlsx)

Name,SKU,Regular price
Mug,MUG-1,12.00

What the checker says about it

  • The file is called "products.xlsx". WooCommerce only accepts .csv and .txt files. On a normal upload WordPress refuses it with "Sorry, you are not allowed to upload this file type."; with a file path on the server WooCommerce says "Invalid file type. The importer supports CSV and TXT file formats." Save or download it as CSV first.

Once the listed rows are fixed, check the file again; the checker also looks for the other problems in WooCommerce's import code, so you do not trade one error for the next.

Other WooCommerce import errors

Sources

Based on WooCommerce 11.2.2's import code and documentation. Not tested on a live store.