Export WordPress Custom Fields to CSV or XML

Export WordPress Custom Fields to CSV or XML

To export WordPress custom fields to CSV/XML go to WP All Export › New Export and select the post type you'd like to export. WP All Export will automatically detect the custom fields from your posts. Drag and drop to select fields to export, arrange the spreadsheet columns, and more.

Select WordPress Custom Fields for Export

To select a field for export, click and drag them from the right and drop them on the left. Here we are exporting custom fields from the Yoast WordPress SEO plugin. The custom fields associated with your theme plugin may be different, but they will be automatically detected and accessible in Available Data › Custom Fields:

After dragging fields over, you can click them to access more options for each element. There you can change the column names, combine data from multiple fields, and more.

Confirm And Preview Your Export

You can click Preview to get an idea of how your export file will look. Click Continue to verify your export settings and then run your export by clicking Confirm & Run Export on the next page. This is how our Yoast export looks:

Understanding WordPress Custom Fields

Custom fields are extra information attached to the posts 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.

Standard WordPress custom fields are stored as a key/value pair. The key is essentially the name of that custom field. So for a real estate property, the custom field storing the street address might have a key of street_address with a value of 123 Main St. You can learn more about custom fields here: https://wordpress.org/support/article/custom-fields/

There are other types of custom fields as well. Some custom fields can store arrays or serialized information, where one key will have multiple values. Custom fields can also be created by plugins like Advanced Custom Fields (also known as ACF), Toolset Types, and more.

Export Posts With Their Taxonomies

Export Posts With Their Taxonomies

To export your WordPress data with their taxonomies, go to WP All Export › New Export and select the post type you'd like to export. Then, drag and drop your taxonomy data to set up your export file. WP All Export will automatically detect all categories and tags attached to your posts.

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 taxonomies here: https://wordpress.org/support/article/taxonomies/

Exporting Posts with Their Taxonomy Data vs Exporting Taxonomies Directly

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 posts and their attached categories and tags.

Select WordPress Categories and Tags to Export

The taxonomies available for export depend on the post type that you have chosen to export. WP All Export will automatically detect all of the taxonomy types that are available. WordPress posts have two by default:

CategoriesTags

Other post types, like WooCommerce Products, will have slightly different ones:

Product categoriesProduct tags

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

Custom XML Feeds for WordPress

Custom XML Feeds for WordPress

To create a custom XML feed go to WP All Export › New Export and select the post type that you want to export. Using WP All Export's custom XML syntax, customize your feed and generate your XML file.

Custom XML vs. Simple XML

With a Custom XML Feed export, you have complete and total control over the structure of the XML file. You literally write the XML feed by hand and can nest elements as deep as you want, add elements outside of the looping post element, create custom loops with PHP functions, and more.

The Simple XML Feed builder uses drag and drop to rearrange the XML elements. You can change the element names, but deep customization is not possible.

How to Build a Custom WordPress XML Feed

In the Export Type section, select Feed › Custom XML Feed:

Select Custom XML Feed

This will reveal the XML Editor, where you'll build your custom XML feed:

Custom XML Editor

To add export elements to the feed, you can drag-and-drop them from the Available Data section on the right side. If you want to add all of the elements from a certain sub-section under Available Data, simply drag the top element, like All Standard, into the XML Editor. After adding your elements, you can use the Preview button to see what your feed looks like with real data.

Everything between and will be repeated for each exported post, and there can only be one loop. You have complete control over the XML output and can manually edit any part of the XML feed in the editor.

Some characters in the data you're exporting might look like XML. CDATA tags are used to distinguish data that could be interpreted as XML markup, but should not be. By default, WP All Export will automatically add CDATA tags around any content that requires it. In the Advanced Options section you can choose to disable this functionality.

Repeating Fields and Arrays

Some fields, like images, have multiple values per post. WP All Export turns these fields into indexed arrays. Whenever WP All Export encounters an indexed array in an XML element it will repeat that element once for every value in the array.

For example, let's assume a post as two images attached to it: image1.jpg and image2.jpg. We want to have one XML element for every image URL. Here's what our XML template will look like:

     {Image URL}

And here's how our exported XML file will look:

     http://example.com/image1.jpg
     http://example.com/image2.jpg

WP All Export will do this with all indexed arrays that it comes across. So if you have a function that returns an indexed array, that XML element will be repeated for each value. Likewise, you can take a field like {Image URL} and turn it into a string, like this:

[implode("|",{Image Title})]

And you'll just get one XML element with all of the values, like this:

Image 1|Image 2

Using PHP Functions in a Custom XML Feed

Just like other export types, you can use custom or native PHP functions on export elements in a Custom XML Feed. The syntax is:

[function_name({Export Element})]

You can pass multiple export elements to your function if necessary.

This allows you to modify data on-the-fly, or output your own XML in the export feed. Just keep in mind that you must disable CDATA tags if you're outputting your own XML via PHP.

Related Docs

Simple XML

CSV & Excel

Standard Post Data

How to Export ACF Fields

How to Export ACF Fields

WP All Export along with the ACF Export Add-On allows you to export data from any Advanced Custom Field(s) present in your post type or custom post type.

The Advanced Custom Fields plugin extends basic custom fields to enable more complex fields, different layouts, and settings. WP All Import has an integration with the ACF plugin to export the information stored in such fields.

Export ACF Text Fields

Export basic ACF text fields such as text area, number, range, email, URL, password, etc.

Export ACF Picker Fields

Export ACF picker fields such as date picker, date time picker, time picker, and color picker.

Export ACF Media Fields

Export ACF media fields such as image, file, oEmbed, gallery, or even a Wysiwyg editor.

Export ACF Choice Fields

Export ACF choice fields such as select, checkbox, radio button, button group, etc.

Export ACF Taxonomy Field

Export ACF taxonomy fields using drag and drop.

Export ACF Google Map Fields

Export ACF google maps fields with the address, latitude, and longitude information.

Export ACF Relational Fields

Export ACF relational fields such as link, post object, page link, relationship, etc.

Export ACF Repeater and Group Fields

Export ACF repeater and group fields easily.

Export ACF Flexible Content Fields

Export ACF flexible content fields.

Export ACF Taxonomy Field to CSV or XML

Export ACF Taxonomy Field to CSV or XML

Taxonomy fields added in ACF are automatically detected by WP All Export and added to the ACF section in Available Data.

Exports the name of the taxonomy terms selected in the ACF field. Multiple values are separated by a pipe ( | ) character.

How to Export WooCommerce Products to Google Merchant Center

How to Export WooCommerce Products to Google Merchant Center

To export products to Google Merchant Center go to All Export › New Export and select WooCommerce Products. Then, change the Export Type to Feed › Google Merchant Center Product Feed and configure the export as required. The exported file is automatically set up for the Google Merchant Center.

Change Export Type to Google Merchant Center Product Feed

When editing a WooCommerce product export, change the Export Type to Feed and select Google Merchant Center Product Feed.

The edit export page will then change to show the Google Merchant Center options:

Fields under Available Data can be used when selecting Custom Data. Inline PHP can also be used.

Basic Product Information Section

Basic product information to export can be defined here:

Item Title: Product title to export, the default option uses the product's current title, but Custom data can be used. This field has a checkbox to make variable products use their parent product title.Item Description: Product description to export, the default option uses the product description, but the short description or Custom data can also be used. This field has two checkboxes controlling what descriptions should be included for variable products.Link: Product link to export. Select between using the product's permalink or Custom data. This export field has a checkbox that adds variation attributes to variable product URLs.Main Image Link: Main image for the product. Select to use the current product featured image or to use Custom data. This export field has two checkboxes to define how images are handled for variable products.Additional Image Link: Secondary product images to export. Select to use current images in the product gallery, or Custom data.

Under Advanced Options, define the following export fields:

Item ID: Unique item ID used to identify products.Item Condition: Condition of the item being sold. Accepted values are new, refurbished, and used. This export field allows using Data Mapping. Exports new by default.Mobile Link: used to define a mobile-friendly version of the same product.

Availability & Price Section

Here's more on the available settings:

Price: Price for the product. The default option uses the current price, but Custom data can also be enabled. This export field has an Adjust Price setting which allows to mark up the price by a percentage or a fixed amount.Sale Price: Sale price for the product. The default option uses the current sale price, but Custom data is available. This export field also has an Adjust Price setting.Availability: Stock for the product. The default option uses WooCommerce stock values, but Custom data can also be used.

Under Advanced Options, change the Currency setting (to any currency supported by WooCommerce and GMC) and modify the following export fields:

Availability Date: Used to define when an anticipated or delayed product will be available. Accepted format: YYYY-MM-DDThh:mmZ. Example: 2021-03-24T13:00-0800.Sale Price Effective Date: Used to define for how long a sale price will be shown to users. Accepted format: YYYY-MM-DDThh:mmZ, separated by a slash (/). Example: 2021-02-24T13:00-0800/2021-02-29T15:30-0800.Cost Of Goods Sold: Used when reporting conversions with cart data to get reports on gross profits. Can be a rough estimate. Accepted format: number plus currency. Example: 10.01 USD.

Product Categories Section

Under Product Categories change how the categories are assigned to the exported products. The following settings are available:

Product Type: Used to include a different product categorization system. Select either Use WooCommerce's product category or Custom data.Product Category: There are 3 available settings to define how product categories are exported:Map WooCommerce's product categories to Google's product categories: This allows to manually map the WooCommerce categories into Google's product categories. Default option.Use WooCommerce's product categories: Uses the existing WooCommerce categories to import into Google Merchant Center. Custom data: Allows defining categories dynamically.

Unique Identifiers Section

Unique Identifiers are unique codes and values used to classify the exported products. Learn more about this here. These are the available settings:

GTIN: Product』s Global Trade Item Number. Supported values: UPC, EAN, JAN, ISBN, or ITF-14. Example: 3234567890126.MPN: Product』s Manufacturer Part Number. Example: SO1234FLYY.Brand: Product's brand name. Example: Soflyy.Identifier Exists: Used to indicate whether or not the unique product identifiers are available for the product. Supported values: yes or no. Available settings: Set to false if product has no GTIN or MPN or Custom data.

Detailed Product Attributes & Item Grouping Section

This section contains settings to define how variable products are grouped, as well as how attributes are exported. Here are the available settings:

Under Item Group ID, define how to group exported variable products. Each variant is exported as a separate product and assigned the same identifier. Choose between either Automatically set the item group ID or Custom data.

The following attributes can be defined when exporting products to the Google Merchant Center:

Color: Select an existing WooCommerce product attribute, choose to Leave Blank, or use Custom data.Size: Select an existing WooCommerce product attribute, choose to Leave Blank, or use Custom data.Gender: Select an existing WooCommerce product attribute, choose to Leave Blank, autodetect or select from WooCommerce product categories, or use Custom data.

More detailed product attributes can be defined under Advanced Options. Here's the available settings:

Size Type: Used to describe the cut of the product. Supported values: regular, petite, plus, tall, big, or maternity.Size System: Country sizing system selected. Exports as blank by default. Supported values: AU, BR, CN, DE, EU, FR, IT, JP, MEX, UK, US.Age Group: Used to set the demographic that the product is designed for. Select from WooCommerce product attributes, choose to Leave Blank, select from WooCommerce product categories, or use Custom data. Supported values: newborn, infant, toddler, kids, or adult.Material: Used to describe the main fabric or material the product is made of. Select from WooCommerce product attributes, choose to Leave Blank, or use Custom data.Pattern: Used to describe the pattern or graphic print found on the product. Select from WooCommerce product attributes, choose to Leave Blank, or use Custom data.

Shipping Section

The Shipping section allows modifying the product's shipping information. Here's more on the available settings:

Shipping Price: This estimated amount allows Google to provide a shipping estimate for the product. This export field has an Adjust Shipping Price setting.Length, Width, Height: This selects the length, width, and height for the product. By default, it will use WooCommerce's product values and convert them to cm, but Custom data can also be used.Shipping Weight: Exports the shipping weight for the product, the default option selected is Do not include in the feed. Allows using WooCommerce's product values or Custom data.Shipping Label: Used to group products together so specific shipping rates can be configured in GMC. Expects a string or plain text.

Advanced Attributes Section

This section contains additional settings that can be applied onto the exported products. Here's more on each one:

Under Product Type define the following export fields:

Multipack: Used to indicate that multiple identical products have been grouped for sale as one product. Expects a numerical value.Adult: Used to indicate that an individual product is for adults only, because it contains adult content such as nudity, sexually suggestive content, or is intended to enhance sexual activity. Supported values: yes, true, no, false.

Adwords & Shopping Campaigns allows defining the following:

Adwords Redirect: Used to specify additional landing page parameters (used for Shopping ads) on the product page. Expects a URL. Custom Labels: Used to create specific filters to use in Shopping campaigns. Learn more here. Expects a string or plain text.

Unit Prices allows to define pricing for products that rely on unit pricing:

Unit Pricing Measure: Used to define the measure and dimension of the product. This value allows users to understand the exact cost per unit for the product. Expects a positive number plus unit. Example: 750ml.Unit Pricing Base Measure: Allows to include denominator for unit price. For example, even if the product is 750ml, users may be interested in seeing the price per 100ml. Expects a positive number plus unit.

There are Additional Attributes that can be defined at the end of this section:

Expiration Date: Used to cause a product to stop showing on a specific date (before the 30 days default). Expects a date, time, and timezone. Format: YYYY-MM-DDThh:mmZ. Example: 2021-02-24T00:30-0800.Energy Efficiency Class: Used to tell users the energy label of the product. Supported values: A+++, A++, A+, A, B, C, D, E, F, G.Promotion ID: Used to match products to promotions. Supports alphanumeric values, underscores, and dashes.

Preview Exported GMC Feed

After the Google Merchant Center Product Feed Export has been configured, click Continue and then click on Confirm & Run Export. Download the exported products by clicking on the Export Feed URL.

Here's a sample preview of a default Google Merchant Center Product Feed export:

Export WordPress Data to a Custom Spreadsheet

Export WordPress Data to a Custom Spreadsheet

To create a new spreadsheet export go to WP All Export › New Export and select the type of posts to export. Drag and drop to select your data, rearrange columns, rename them, and customize your file. There are three types of spreadsheets available: CSV, Excel (XLSX), and Excel (XLS).

CSV WordPress Exports

Go to Export Type › Spreadsheet and select CSV File from the drop-down.

CSV stands for Comma Separated Values. Data is stored in plain text, with commas separating each column. CSVs are the most flexible and widely used type of spreadsheet. They can be opened and edited in any text editor, as well as spreadsheet software like Excel, Google Sheets, Numbers, and LibreOffice:

The posts you export will each be on their own row in the CSV file. Each export element will appear as a column in your CSV file. If the data has spaces or line breaks, WP All Export will automatically wrap the value in quotes to make it valid. Keep in mind that data with line breaks may look broken if you open the file in a text editor, but it's not. The quotes allow spreadsheet software to put all of the line breaks and spaces in a single column.

In the Advanced Options section, you can change the delimiter from commas to something else for your CSV file, and you can choose whether or not you want to include the header row.

Excel WordPress Exports

When creating a new export you can choose Excel (XLS) or Excel (XLSX) as the file type. This file type is specifically for Excel and the data is not stored in plain text.

Just like CSV exports, each record will be stored as a row and each export element will be a column in your file.

Customizing Your Spreadsheet

When exporting your WordPress data to Excel or CSV, you can add elements by dragging them in from the Available Data section on the right:

You can also add individual fields, add all fields, clear fields, and preview the export using the buttons below the export template box.

After adding fields, you can drag and drop them to arrange the columns in any order that you'd like. If you want to remove an export element, simply drag it out of the export box and drop it.

To change the column name, click on a field that has been dragged into your export to access the Edit Export Field modal:

Related Docs

Simple XML

Custom XML

Standard Post Data

Export ACF Text Fields to CSV or XML

Export ACF Text Fields to CSV or XML

WP All Export automatically detects the ACF fields in the posts you've chosen to export. Drag and drop fields from the Available Data › ACF section into the export editor on the left.

The following ACF text fields are available to be exported: Text, Text Area, Number, Range, Email, URL, and Password. Here's more on each field:

Text: Exports a string or static text. Text Area: Exports a longer string or static text.Number: Exports a numerical value. Range: Exports a numerical value within a range. Email: Exports an email address. URL: Exports an URL. Password: Exports a password.

How to Export WordPress Data to CSV/XML

How to Export WordPress Data to CSV/XML

WP All Export turns WordPress data into custom spreadsheets and XML feeds. First, select the data to export. Then, drag & drop to set up the export file, deciding exactly what gets exported and how the data gets formatted.

You can export WordPress posts, pages, WooCommerce products, orders, ACF fields, users, and custom post types from any theme or plugin. Export all custom fields, images, attachments, and taxonomies (categories or tags). You can schedule exports using cron jobs or via our Automatic Scheduling Service.

Create unlimited combinations of filters to control exactly which records get exported. Connect with external apps using the Zapier integration. Run custom PHP code. Run exports using WP_Query. Enable Client Mode on specific exports.

File Types

Export to CSV/Excel, simple XML, or to a custom schema XML.

Filters

Learn how to filter the exported WordPress data; single and multiple filters can be used.

Standard Post Data

Learn how to export the standard WordPress post data into CSV or XML.

Custom Fields

Learn how to export custom fields from any other plugin or theme using WP All Export.

Images & Attachments

Learn how to export images and attachments from WordPress to CSV or XML.

Categories & Tags

Export taxonomies directly, or export taxonomies along with posts.

WooCommerce

Export WooCommerce products, orders, customers, reviews, coupons. Export products to the Google Merchant Center.

ACF

Export fields from the Advanced Custom Fields plugin. All regular ACF fields are supported (text, picker, media, taxonomies, etc).

Users

Learn how to export WordPress users to CSV or XML.

Comments

Learn how to export WordPress comments to CSV or XML.

Settings

Learn more about WP All Export's settings and options.

Scheduling

Learn how to schedule imports using cron jobs or our paid Automatic Scheduling Service.

External App Integration

Learn how to connect with external applications (such as Gmail, Google Drive, etc) using Zapier.

Advanced Topics

Custom export fields, custom PHP functions, Client Mode, and WP_Query exports.