Is Your Import File Valid for WP All Import?
You may have a CSV, XML, or JSON file and are currently wondering if it will work with WP All Import. The short answer is yes, as our plugin can import most files.
This guide will show you how to build the same example files shown here: Example XML & CSV Files. Below are some considerations for each import type.
Valid CSV Import File
Most import files should work with WP All Import. You can test your own import files at http://www.wpallimport.com/try/ by following our quickstart import documentation.
Your file should contain all the information for each specific record on a separate row.
If you don't have an import file yet, you can follow this documentation to create one.
Use your favorite spreadsheet software such as Google Sheets, Apple Numbers, or Microsoft Excel. Create a new spreadsheet and define your import columns, such as product title, SKU, price, color, and description.
Assuming that you're creating simple products, you can then enter one product per row, like so:
For variable products, you need to also include what links them together, such as the parent SKU.
The most basic variable product configuration is a parent product with multiple different variations linked to that parent product, although there are other setups you can follow.
You can learn more about the different ways to import variable products at https://www.wpallimport.com/documentation/import-variable-products-woocommerce/#map-incoming-product-data:
Once you've added all product rows, you're done! You've successfully built a CSV import file. These same instructions apply to creating a valid Excel import file.
Import Any CSV, XML, or Excel to WordPress
- Any theme or plugin
- Images & galleries
- Custom fields
- Categories & tags
- Woo, ACF, Meta Box, JetEngine
Valid XML Import File
Extensible Markup Language or XML "is a markup language that provides rules to define any data." It's widely used in feeds and has a specific format that you need to follow.
The first line requires the following:
<?xml version='1.0' encoding='UTF-8'?>
Afterward, you need to include a main node:
<document>
</document>
Once that's done, you can add each product node and its data. Here, we have included the title, SKU, price, and color:
<product>
<title>Soflyy Shoes</title>
<sku>888</sku>
<price>10</price>
<color>black</color>
<description>These are nice shoes.</description>
</product>
That's a simple product. If you want to add a variable product, you need to include the data that links the variations together with the parent product, e.g., parent SKU. Here's a full XML example of a variable product that has two variations:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<product>
<title>Soflyy T-Shirt</title>
<sku>999-X</sku>
<parent_sku />
<price />
<color />
<description>This shirt is awesome.</description>
</product>
<product>
<title>Soflyy T-Shirt (blue)</title>
<sku>999-B</sku>
<parent_sku>999-X</parent_sku>
<price>15</price>
<color>blue</color>
<description />
</product>
<product>
<title>Soflyy T-Shirt (red)</title>
<sku>999-C</sku>
<parent_sku>999-X</parent_sku>
<price>15</price>
<color>red</color>
<description />
</product>
</document>
Valid JSON Import File
JSON is another popular import format. JSON stands for JavaScript Object Notation, which is a lightweight data interchange format that uses human-readable text.
Most JSON files with valid data should be importable. If the file is not recognized as a JSON, you can force the format by modifying the import URL and appending a #feed.json anchor, like so:
https://example.com/getFile.php#feed.json
Related Docs
Example XML and CSV files to use with WP All Import.
Quickstart guide showing you how to import any file into WordPress.
Learn about the different import types available in WP All Import.