---
title: "“Invalid File” and Other Upload Errors in the WordPress Importer: What Each One Means"
url: "https://wpimportexport.com/wordpress-import-file-upload-errors/"
description: "What the import errors for empty files, unreadable spreadsheets, wrong file types, broken JSON and multi-sheet Excel files mean, and how to fix each one."
type: post
published: 2026-11-14T13:00:00+00:00
modified: 2026-11-14T10:44:43+00:00
categories: ["Import Guides", "Tutorials"]
tags: ["CSV import", "Import Export by RockStarLab"]
docs_topics: ["Import guides"]
---

# “Invalid File” and Other Upload Errors in the WordPress Importer: What Each One Means

You pick the file, click upload, and the importer refuses it, or accepts it and shows something that isn’t your data. Most of these problems come from the file, not from WordPress, and each one has a quick fix. We uploaded eight typical problem files into [Import Export by RockStarLab](https://wordpress.org/plugins/import-export-by-rockstarlab/). Below is what each message means and what to do.

**Free and PRO:** file checks are the same in both.

## Short Answer

| Message or symptom | Cause | Fix |
| --- | --- | --- |
| “The spreadsheet could not be read” | Damaged file, or a file with the wrong extension | Open it in Excel, Google Sheets or LibreOffice and save it again as .xlsx, .ods or .csv |
| “The file is empty” | A 0-byte file | Export the data again |
| “Invalid file type” | Not CSV, XLSX, ODS, JSON, XML or ZIP | Save it in one of these formats; rename a tab-separated .txt to .csv |
| “Invalid JSON file” | The JSON is cut off or has a syntax error | Download it again or check it in a JSON validator |
| Everything in one column | Wrong delimiter | Pick the delimiter in Format Options |
| Wrong columns from an Excel file | The data isn’t on the first sheet | Move the sheet to the front or save it as CSV |
| “Total Rows: 0” | Only a header row | Export again with the data |

## “The spreadsheet could not be read”

![Upload failed: The spreadsheet could not be read. Open it in Excel, Google Sheets or LibreOffice and save it again as .xlsx, .ods or .csv.](https://wpimportexport.com/wp-content/uploads/2026/11/01-spreadsheet-unreadable.webp)

_A damaged or mislabelled spreadsheet: save it again from a spreadsheet app._

The file ends in .xlsx or .ods, but it isn’t a spreadsheet the importer can open. It may have been damaged in a download, or it’s another format with a spreadsheet extension. Some systems save an HTML table or a CSV as .xls or .xlsx. Open it in Excel, Google Sheets or LibreOffice and choose **Save as** .xlsx, .ods or .csv. That writes a proper file.

## “The file is empty”

![Upload failed: The file is empty.](https://wpimportexport.com/wp-content/uploads/2026/11/02-file-empty.webp)

_A file with no bytes in it, often an export that failed before it was saved._

The file has 0 bytes. This usually happens when an export from another system failed before it wrote anything, or when a download was interrupted. Check the file size before you upload, and export it again.

## “Invalid file type”

![Invalid file type. Please upload CSV, JSON, XML, XLSX, ODS, or ZIP files only.](https://wpimportexport.com/wp-content/uploads/2026/11/03-invalid-file-type.webp)

_The importer reads CSV, XLSX, ODS, JSON, XML and ZIP files._

The importer reads CSV, XLSX, ODS, JSON, XML, and ZIP files with one of these inside. A **tab-separated .txt** file, which many systems export, only needs a new extension: we renamed `tabbed.txt` to `tabbed.csv`, and the preview showed both columns correctly. For a .xls or .numbers file, open it and save it as .xlsx.

WP-CLI and AI agents get a fuller message for the same file: “This type of file cannot be imported. Use a CSV, XLSX, ODS, JSON, XML or ZIP file. A tab-separated .txt file can be renamed to .csv.”

## “Invalid JSON file”

JSON has to be complete: our test file ended after the first record, without the closing `]`, and the upload said “Invalid JSON file”. Download the file again, or paste it into a JSON validator to find the line with the mistake. For the shapes of JSON the importer reads, see [importing JSON into WordPress posts](https://wpimportexport.com/import-json-into-wordpress-posts/).

## Everything ends up in one column

Excel in many European languages saves CSV files with semicolons instead of commas. The importer detects the delimiter when it reads the file: our semicolon file showed three columns in the preview.

![Preview Data: Total Rows 1, Columns 3, with the columns Title, Content and Status](https://wpimportexport.com/wp-content/uploads/2026/11/04-semicolon-preview.webp)

_A file separated by semicolons: three columns in the preview means the delimiter was read correctly._

If the preview shows a single column with semicolons or tabs inside the values, go back one step, choose the right **Delimiter** in Format Options and continue. The same panel has **File encoding** for files with broken accents. A UTF-16 file from Excel was read correctly with the default “Detect automatically”.

## Excel files with several sheets

Only the first sheet of an XLSX or ODS file is imported. Our test workbook had a “Notes” sheet first and the data on the second sheet, so the preview showed one column called “nothing here” and 0 rows:

![Preview Data: Total Rows 0, Columns 1, with a single column named nothing here](https://wpimportexport.com/wp-content/uploads/2026/11/05-first-sheet-only.webp)

_An Excel file whose first sheet holds notes: only the first sheet is read._

Move the data sheet to the front, delete the other sheets, or save the data sheet as CSV.

## “Total Rows: 0”

A file with only the header row uploads fine, but the preview says Total Rows: 0 and there is nothing to import. The export that produced it probably had filters that matched nothing. Check the source and export again.

## “Sorry, there has been an error” in Tools → Import

That message comes from the built-in WordPress Importer, which reads only WordPress export files (WXR XML). A CSV or Excel file gives this error there. Use the plugin’s **Import** wizard for spreadsheets and other formats; see [importing CSV files with field mapping](https://wpimportexport.com/how-to-import-csv-files-into-wordpress-with-field-mapping/).

## Before you import

Once the file uploads, check the preview step before you continue: the number of rows and columns tells you whether the file was read the way you expect. For a large import, [back up the site](https://wpimportexport.com/how-to-create-a-wordpress-website-backup-and-restore-it/) first.

## With an AI agent

An AI agent connected through the WordPress MCP Adapter (see [connecting Claude Code to WordPress](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)) uploads files with `rsl-ie/upload-create`. When we asked it to start an upload of `posts.txt`, it got back: “This type of file cannot be imported. Use a CSV, XLSX, ODS, JSON, XML or ZIP file. A tab-separated .txt file can be renamed to .csv.” The agent can pass that on, rename the file and try again.

## FAQ

### Which file types can I import?

CSV, XLSX, ODS, JSON, XML, and a ZIP with one of these inside.

### My file opens fine in Excel. Why is it refused?

Excel opens many formats that aren’t real XLSX files. Save it from Excel as .xlsx or .csv, and upload the new file.

### Can I import a specific sheet of an Excel file?

The first sheet is imported. Move the sheet you need to the front, or save it as CSV.

### Is there a file size limit?

No. Large files are uploaded in chunks.

### Why do accented letters look wrong?

The file uses a different encoding. Choose it under File encoding in Format Options; see [Excel and CSV formatting problems](https://wpimportexport.com/excel-leading-zeros-dates-scientific-notation-csv/) for related issues.

## Related Guides

- [How to Import CSV Files into WordPress with Field Mapping](https://wpimportexport.com/how-to-import-csv-files-into-wordpress-with-field-mapping/)
- [Excel Leading Zeros, Dates and Scientific Notation in CSV](https://wpimportexport.com/excel-leading-zeros-dates-scientific-notation-csv/)
- [How to Import JSON Data into WordPress Posts](https://wpimportexport.com/import-json-into-wordpress-posts/)
- [CSV, JSON, XML, XLSX and ODS: What Data Formats Are and When to Use Them](https://wpimportexport.com/csv-json-xml-xlsx-and-ods-what-data-formats-are-and-when-to-use-them/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
