How to Export WordPress to CSV, Excel, or XML

How to Export WordPress to CSV, Excel, or XML

WP All Export exports WordPress to CSV, Excel, and XML. Each file type can be easily configured to meet pretty much any format, schema, or structure.

Drag & drop to rearrange and rename columns in CSV and Excel exports. Columns can be combined, and data passed through PHP functions. You can even change the delimiter to create TSV files, or whatever is required.

When exporting to XML you can drag & drop to create a simple feed. For more complicated XML schemas, WP All Export uses a simple syntax that allows you to directly write out the format that you need in XML.

Export WordPress to CSV and Excel

Export WordPress to CSV, TSV, XLS, and XLSX.

Create a Simple WordPress XML Feed

Drag & drop to create a custom WordPress XML feed.

Create a WordPress XML Feed with Custom Schema

Code a custom XML feed with any complex structure.

How To Export WooCommerce Customers to CSV or XML

How To Export WooCommerce Customers to CSV or XML

To export your customers, go to WP All Export › New Export and select WooCommerce Customers. Next, drag and drop from the Available Data section to create your export file. Then run the export and download your CSV or XML.

WordPress Users vs WooCommerce Customers

A WooCommerce customer is a specific type of WordPress user.

When someone visits your WooCommerce site and creates a purchase, WooCommerce creates a user account for them. This user account is assigned the role customer, with a set of WooCommerce specific data attached to their account.

Drag and Drop to Export WooCommerce Customer Data

All data tied to WooCommerce customers is in the Available Data section. Drag and drop data elements from right to left to customize your export file.

Exporting WooCommerce Customer Data

WooCommerce customer data is divided into four different sections: Standard, Address, Custom Fields, and Other.

Standard

All basic export fields tied to your WooCommerce customers are in Available Data › Standard. This data is standard for all WordPress user accounts:

ID: Customer ID, which is actually the user ID assigned by WordPressUsername: The username the user chose when creating their accountUser Email: Email address associated with the customer accountFirst Name: Customer's first nameLast Name: Customer's last nameUser Registered: Date when the customer registeredUser Nicename: Sanitized version of the usernameUser URL: Website associated with the customer accountDisplay Name: The name to be displayed publicly, which is selected in WordPress as either the username, first/last, or nicknameNickname: A name chosen by the user to be displayed on the frontendDescription: A description of the user, also labeled as Biographical Info in WordPress

Address

Address fields tied to your WooCommerce customers in Available Data › Address. These address fields are added by WooCommerce and stored in WordPress as custom user meta.

Every customer in WooCommerce has a billing address and a shipping address. Both sets of addresses are organized in the same way:

First NameLast NameCompanyAddress 1Address 2CityPostcodeCountryStateEmailPhone

Custom Fields

Custom fields added to your WooCommerce Customers are in Available Data › Custom Fields. Custom fields are extra information (or metadata) added by your plugins or themes, and they are automatically detected by WP All Export.

For example, WooCommerce adds an "_order_count" custom field which keeps track of how many orders a customer has done.

Other

Other less used export fields tied to your WooCommerce customers are in Available Data › Other.

Exporting WooCommerce Customer Passwords

To export a WooCommerce customer password, include the User Pass export field from Available Data › Other.

These are hashes of the passwords, not the passwords themselves. Hashing is a one-way action that irreversibly scrambles a string of text. It is not possible to reverse the hashing process and reveal the original password. You can, however, import the hashed passwords back into WordPress and customers will be able to log in with their old password.

Importing Images From URLs

Importing Images From URLs

Choose the option Download image(s) hosted elsewhere to import images from a URL starting with http:// or https://.

Drag & drop the element or attributes containing your image URLs or filenames to the text box.

Image URL Elements

Use the Preview & Test button to see the final URLs that WP All Import will attempt to download your images from.

If your images are not importing as expected, the cause is almost always that the URLs you specified don』t actually point to valid images.

Make sure one complete image URL is present on each line, or that your complete image URLs are separated by the separator character you specify.

Example 1 – Constructing Image URLs from File Names

If your XML or CSV file only contains the image file name, not the complete URL to the file, you』ll have to construct the URL to your file by prepending the image file name with the URL to the folder containing it.

In your file: my-image-name.jpgImage URL: http://example.com/my-folder/my-image-name.jpg

Static Text Plus Elements

Example 2 – Importing From Attributes

If your images are in an attribute and not an element, make sure you click and drag the attribute, not the element. Attributes only exist in XML files.

What is an attribute?

If your image URLs are stored in attributes, not elements, click and drag `attribute` to the image URLs textbox, not `element`.

Example:

Drag `url` to the image URLs textbox, so the textbox contains {img[1]/@url}, not just {img[1]}.

Export WordPress Categories and Tags to CSV or XML

Export WordPress Categories and Tags to CSV or XML

To export WordPress categories and tags go to WP All Export › New Export and select which type of taxonomies to export. Then, drag and drop your taxonomy data to set up your export file. WP All Export will automatically detect all custom taxonomies and term data.

Understanding WordPress Taxonomies

Taxonomies are used in WordPress to group posts, products, and other post types together based on relationships. By default, WordPress posts have two taxonomy types: Categories and Tags.

Plugins and themes can also add their own custom taxonomies. For example, a real estate plugin might create a custom taxonomy called Property Type, with terms like House and Apartment. An e-commerce plugin might create a custom taxonomy called Brand, with a separate term for each brand of product available.

Read more about WordPress taxonomies: https://wordpress.org/support/article/taxonomies/

Exporting Taxonomies Directly vs Exporting Posts with Their Taxonomy Data

WP All Export offers two ways to export taxonomy data: export the posts with just the term name, or export taxonomies directly with all of the term data but without the posts they are attached to.

This guide focuses on exporting taxonomies and term data directly.

Select Taxonomies to Export

Go to WP All Export › New Export, select Taxonomies, and then select which taxonomy to export from the drop-down list. Here you can see the custom taxonomies added by WooCommerce:

Export WordPress Term Meta

Taxonomies are divided into three sections in Available Data: Standard, Media, and Term Meta.

The Standard section contains the most commonly used term meta.

Term ID: The term ID, assigned by WordPressTerm Name: The term's name, which is displayed most commonly on the frontend and in the WordPress admin areaTerm Slug: The term's slug, a database-friendly version of the nameDescription: A description of the term, similar to a post's contentParent ID: The ID of the parent term that this term is a child ofParent Name: The name of the parent termParent Slug: The slug of the parent termCount: The number of posts that are attached to this term

Export WordPress Taxonomy Images

The Media section contains the images or thumbnails added to your taxonomy.

Taxonomies don't have images by default, but this functionality can be added by other plugins. For example, WooCommerce enables thumbnails for its product categories. Exporting WordPress taxonomy images works just export post images.

Read more about how to export images from WordPress: https://www.wpallimport.com/documentation/export-wordpress-images/

Export WordPress Term Meta

The Term Meta section contains any other custom metadata added to your taxonomies by your theme and plugins. Term meta is automatically detected.

A Complete WordPress Taxonomy Export

After dragging and dropping the term meta and organizing your export, click the Preview button to see how your file will look.

How to Export WooCommerce Products to CSV or XML

How to Export WooCommerce Products to CSV or XML

To export your products, go to All Export › New Export and select WooCommerce Products. Next, drag and drop the elements on the right to build your CSV or XML export file. Then, run the export to create your product's export.

Step 1:  Select WooCommerce Products

First, go to All Export › New Export and choose to export WooCommerce Products. Click Customize Export File to continue.

Step 2: Customise Your WooCommerce Products Export File

All data related to your WooCommerce Products is in Available Data section. Drag and drop data elements from right to left to customize your export file.

This data is divided into the following sections: Standard, Product Data, Media, Taxonomies, Custom Fields, and Other.

Standard

Basic WooCommerce Product data is in Available Data › Standard:

ID: The post ID, a unique number given to every post in WordPress.Title: The title or name of the product.Content: A description of the product.Short Description: Similar to the excerpt for posts, usually a summary of the content section.Date: The date the product was published, in y-m-d format.Post Type: The post type being exported, which is product in this case.Permalink: The URL of the product.Parent Product ID: Variable products are attached to a parent product, and this exports the post ID of that parent product (A 0 is exported for products without a parent).

Product Data

More detailed WooCommerce Product data is in Available Data › Product Data:

Sku: A product code used to reference and differentiate products. Price: The product's current price, which is the regular price unless the sale price is active and lower.Regular Price: The regular, full price of the product.Sale Price: The sale price of the product.Stock Status: One of several preset values. The default WooCommerce stock statuses are instock, outofstock, and onbackorder. Stock: The number of products currently in stock and available for sale.External Product URL: The affiliate link for external products.Total Sales: Number of times the product has been sold.Attributes: This will export the attribute's name, value, if it's is used in variations, if it's visible, and if it's a taxonomy or not. This data is more easily exported in the Attributes section.Shipping Class: If configured, it exports the name of the product's shipping class.

If your product has attributes like size or color, they will be automatically detected and added to the Attributes section, at the bottom of Product Data.

Media

Images and file attachments associated with your WooCommerce Products are in Available Data › Media. Images and files are treated the same by WordPress. There are two sections inside the Media section, Images and Attachments. Both contain the same types of fields:

URL: The URL of the file or image.Filename: The filename of the file or full size image.Path: The path, or location on the server of the file or image.ID: The attachment ID of the file or image, similar to a post ID. TitleCaption DescriptionAlt TextFeatured: The URL of the featured image

Taxonomies

The categories and tags that the products are attached to are in Available Data › Taxonomies. By default, there are only two, but all custom taxonomies will be automatically detected and available here.

Product categoriesProduct tags

Custom Fields

Custom fields are in Available Data › Custom Fields. For example, data added to Yoast SEO would appear here.

Other

Other, less used product data is in Available Data › Other. This is an incomplete list, with the more important export fields:

Status: Similar to the post status. The default product statuses are publish, draft, and private.Slug: The database friendy name of the product, used in the product URL.Downloadable: Whether the product is downloadable or not.Downloadable Files: Contains the files for that product if the product is downloadable.Sale Price Dates From: When the sale date starts.Sale Price Dates To: When the sale date ends.Manage Stock: If the product handles stock or not, exports yes or no.Up-SellsCross-SellsTax StatusTax ClassWeightLengthWidthHeight

Step 3: Download Your Exported Products

Once you've configured your product's export as required, click Continue to verify your export settings. Next, click Confirm & Run Export when you're ready to run your export.

After your export is done, download the WooCommerce Product export. You can download the export file directly, or you can download a Bundle. The Bundle contains your exports data and a settings file for WP All Import. Upload the Bundle to WP All Import on another site to quickly import these WooCommerce Products.

Here's a quick look at a fairly standard WooCommerce product export:

Image Options

Image Options

The Images section in WP All Import provides multiple options to better control how and when your images are imported. The available options will vary based on which source you've chosen for your images.

Search through the Media Library for existing images before importing new images

Search through the Media Library for existing images before importing new images

This option attempts to match previously imported images by either URL or filename based on your selection. If no previously imported image is found the image is downloaded and passed to WordPress for processing. Then it's linked to the record.

Keep images currently in Media Library

Keep images currently in Media Library

When this option is unchecked WP All Import will first delete every image attached to the record being processed. Then it will proceed through the other options as usual. If your images change at the source without having their names or URLs updated in your file, you'll need to uncheck this box to ensure the latest versions are always downloaded. Note: If this option is unchecked the option to 'Skip posts if their data in your file has not changed' (Manage Imports > Import Settings) will be disabled.

Scan through post content and import images wrapped in tags 

<img width="1024" height="138" src="https://www.wpallimport.com/wp-content/uploads/2021/10/scan-through-post-content-1024x138.png" alt="Scan through post content and import images wrapped in

This will search through whatever you've provided in the Content/Description field and import any images that are wrapped in tags. Once the images are imported the tags will be updated to point to the local image. Note: the image URLs must be absolute such as https://yoursite.com/yourimage.png and not /yourimage.png

Other Image Options

Export Standard WordPress Post Data to CSV or XML

Export Standard WordPress Post Data to CSV or XML

All posts have a set of standard data, like title, content, publish date, etc. To export this data, create a new export with WP All Export and then drag and drop to set up your export file.

Standard Data Fields

ID: The post ID, a unique number given to every post in WordPress.Title: The title of the post.Content: The main post content.Excerpt: A summary of the post content.Date: The date the post was published, in y-m-d format.Post Type: The post type of the exported records.Permalink: The URL of the post.

Besides exporting standard post data, you can also export media, taxonomies, custom fields, and more. You can see those elements below on the right:

Other custom post types like WooCommerce products or real estate properties will have different types of data available for export. Plugins that add custom data to posts, like Yoast or ACF, are automatically added to Available Data.

Each post in your export is a row in your CSV. The fields you drag in are columns. You can click the Preview button to see what your export file looks like.

Preview to make sure your WordPress CSV/XML export is correctly configured.

How To Export WordPress Comments to CSV or XML

How To Export WordPress Comments to CSV or XML

To export WordPress comments, go to WP All Export › New Export and select Comments. Then, drag and drop your comment data to set up your CSV/XML export file. All relevant comment data is automatically detected.

Export WordPress Comment Data

Comments data is split into four different categories in the Available Data section: Comment Data, Author Info, Parent, and Other.

Basic, commonly used comment data is accessible in Available Data › Comment Data.

ID: The comment ID, assigned by WordPressPost ID: The ID of the post where this comment was madeContent: The main content of the comment Approved: The comment's approval status, with 1 for approved and 0 for not approvedComment Date (Server Time): Date and time when the comment was made, using the timezone that your server is set toComment Date (GMT): Date and time when the comment was made, in GMT/UTC time

Export Comment Author Info

The Author Info section contains all of the information and metadata related to the author of each comment.

Author Name: The name specified by the user when they posted the comment, or the display name of the registered user account if they were logged in when the comment was madeAuthor Email: The email address specified by the user when they posted the comment, or the email address attached to the registered user account if they were logged in when the comment was madeAuthor URL: The URL of the author's websiteAuthor IP: The IP address of the entity that posted the commentAgent: Information describing the web browser used to post the commentUser ID: If the author is registered on your site, this would provide that user's ID (as assigned by WordPress), otherwise, 0 is returned.

WordPress Comment Replies and Parent Posts

The Parent section contains information related to the WordPress parent post where the comment was made, and, if applicable, the parent comment that this comment is a reply to.

Parent Post Slug: The slug of the parent post where the comment was madeParent Post Title: The title of the parent postParent Post ID: ID of the parent post, assigned by WordPressParent Comment ID: The comment ID of the parent that the exported comment is replying toParent Comment Date (Server Time): Date and time when the parent comment was made, using the timezone that your server is set toParent Comment Date (GMT): Date and time when the parent comment was made, in GMT/UTC time

Other Comment Data

The Other section contains automatically detected comment data added by plugins and themes. The Karma field, no longer in wide use, is also stored here.

How to import any CSV/XML to WordPress.

How to import any CSV/XML to WordPress.

Setting up an import for thousands of posts is very similar to manually creating a post. You create a template for your posts that WP All Import uses when importing your data. To set add data from your import file to your import template, you simply drag and drop it.

Step 1: Upload Your File

The first step to creating an import is to upload your import file. You can choose to upload the file from your computer, paste in a URL to the file, or choose an existing file that you've already used with WP All Import.

Next, choose either New Items or Existing Items. If you are importing data from your file into posts that are already in your site, select Existing Items. Otherwise, select New Items.

Finally, you need to decide what you want to import. You can import posts, pages, taxonomies, users, or custom post types added by other themes and plugins like WooCommerce products or real estate properties.

Step 2: Review Your Data

WP All Import will process your file and prepare it for import. If you uploaded a CSV, check that the correct delimiter was used. If you uploaded an XML file, check that the correct node was selected.

If you only want to import some of the records in your import file you can add filter rules.

Step 3: Configure Your Import

Every column or element from your import file will be displayed on the right. On the left you have your import. WP All Import will create posts using the import template you create here. Simply drag your import data from right to left. You can fill in as much or as little of the fields as you like depending on your needs.

Step 4: Choose Which Data to Update

Here you can tell WP All Import how to handle each specific piece of data. For example you can have it only add new images to posts, or just update the stock and price for your products.

You can also configure this import to run on a schedule, and other advanced options.

Step 5: Confirm & Run Import

Now it's time to run your import.

How To Export WordPress Users to CSV or XML

How To Export WordPress Users to CSV or XML

To export WordPress users go to WP All Export › New Export and select Users. Then drag and drop to set up your CSV/XML, including automatically detected custom user data.

Select WordPress User Data to Export

Drag and drop elements from Available Data into the export editor on the left to add them to your export file. You can click the Preview button to see what your export file looks like.

User data is into four different categories: Standard, Address, Custom Fields, and Other.

Exporting Standard WordPress User Data

Data describing the user's WordPress user account are found Available Data › Standard:

ID: The user ID, assigned by WordPressUsername: The username the user chose when creating their accountUser Email: Email address associated with the user accountFirst Name: User's first nameLast Name: User's last nameUser Registered: Date that the user registeredUser Nicename: Sanitized version of the usernameUser URL: Website associated with the user accountDisplay Name: The name to be displayed publicly, which is selected in WordPress as either the username, first/last, or nicknameNickname: A name chosen by the user to be displayed on the frontendDescription: A description of the user, also labeled as Biographical Info in WordPress

Exporting WordPress User Address Data

By default, WordPress does not include billing and shipping address data fields. Installing and activating WooCommerce adds these fields to all users on your site.

With WooCommerce, each user account has two identical sets of address data, one for shipping and one for billing:

First NameLast NameCompanyAddress 1Address 2CityPostcodeCountryStateEmailPhone

Exporting WordPress User Custom Fields

Custom fields are extra information attached to the users on your WordPress site. They're also known as metadata. Many pieces of data are stored as custom fields, like a product's price or a real estate property's address.

By default, users will not have any custom fields attached to them. Plugins and themes, however, will add them. In fact, this is how WooCommerce adds the billing and shipping addresses to user accounts. WP All Export knows about those custom fields, so it moves them to the Address section. WP All Export will automatically detect other custom fields, and add them to Available Data › Custom Fields.

Other User Data

Here you can find other less common user fields, such as:

User Role: All users have a role that determines what they can do when logged in. You can read more about user roles here: https://wordpress.org/support/article/roles-and-capabilities/User Pass: A hash of the user's password. Read on for more on user passwords.And everything else. There's a lot of user data that the vast majority of people will never need to export. In case you do, it's all here.

Exporting WordPress User Passwords

To export a WordPress user password, include the User Pass export field from Available Data › Other.

These are hashes of the passwords, not the passwords themselves. Hashing is a one-way action that irreversibly scrambles a string of text. It is not possible to reverse the hashing process and reveal the original password. You can, however, import the hashed passwords back into WordPress and users will be able to log in with their old password.