How to fix it
- Open the file and check that it has a header row and product rows. A 0-byte file usually means the export failed; download it again.
- If the file is large, ask your host to check post_max_size and upload_max_filesize in php.ini: post_max_size must be at least as large as upload_max_filesize. Or split the file into smaller files.
- Upload the .csv again on Products, Import.
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.
Questions
- What does "File is empty. Please upload something more substantial." mean in WooCommerce?
- The upload reached the server with nothing in it, so WordPress stopped before WooCommerce read a single row. On a single-site WordPress the message goes on: "This error could also be caused by uploads being disabled in your php.ini file or by post_max_size being defined as smaller than upload_max_filesize in php.ini." WooCommerce's own upload code shows almost the same text when no uploaded file arrives at all. So the file may really be empty (0 bytes), or the upload may have been lost on the way because of the server settings it names.
- How do I fix it?
- Open the file and check that it has a header row and product rows. A 0-byte file usually means the export failed; download it again. If the file is large, ask your host to check post_max_size and upload_max_filesize in php.ini: post_max_size must be at least as large as upload_max_filesize. Or split the file into smaller files. Upload the .csv again on Products, Import.
- Is this the same as "The file is empty or using a different encoding than UTF-8"?
- No. "File is empty. Please upload something more substantial." appears at upload, when the file has no content or never arrived. "The file is empty or using a different encoding than UTF-8" appears later, on the mapping screen, when the file has a header row but no product rows.
Other WooCommerce import errors
- A new variation cannot be created because the parent product has no "%s" attribute.
- A new variation cannot be created because "%1$s" is not an option of the parent product's "%2$s" attribute.
- A new variation can only be created for a variable parent product.
- Sorry, you are not allowed to upload this file type.
- Invalid file type. The importer supports CSV and TXT file formats.
- The file is empty or using a different encoding than UTF-8, please try again with a new file.
- All checks
Sources
- WordPress source: wp-admin/includes/file.php, lines 938-951 (the empty-upload message): https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/file.php#L938-L951
- WooCommerce 11.2.2 source: CSVUploadHelper.php, line 75: https://github.com/woocommerce/woocommerce/blob/11.2.2/plugins/woocommerce/src/Internal/Admin/ImportExport/CSVUploadHelper.php#L75
Based on WooCommerce 11.2.2's import code and documentation. Not tested on a live store.