Back to blog
5 min read 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. 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.
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.
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.
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.

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
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
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.

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 first.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) 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 for related issues.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

Your email address will not be published. Required fields are marked *

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE