How to Export WordPress Categories and Tags
To export WordPress categories and tags, go to WP All Export › New Export and select the type of taxonomies to export. Then, drag and drop the desired data fields to configure your export file. WP All Export automatically detects all custom categories and tags.
Understanding WordPress Categories and Tags
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.
In general, categories allow you to broadly group post topics, while tags allow you to describe your posts in more detail.
Note that categories are often hierarchal. For example, someone running a travel blog might have a Region category with subcategories like Africa, Asia, and Europe. Each region subcategory can in turn have country subcategories like France and Germany in the case of Europe.
In this arrangement, Europe is considered to be the parent of France, while France is considered to be the child. Likewise, Region is the parent of Europe.
Plugins and themes can also add their own custom categories and tags. For example, a real estate plugin might create a custom category called Location with a hierarchy of subcategories based on states, counties, and municipalities. It might also create custom tags like Fireplace, Balcony, etc., to describe a property's key features.
But shouldn't Fireplace, Balcony, etc. be subcategories of a Features category instead of tags? you might ask. This question is at the heart of much of the confusion about categories and tags. Location descriptors like states, counties, and municipalities very clearly form a natural hierarchy, i.e. a municipality can only belong to one county, and a county can only belong to one state. Because of this, these should be structured as categories and subcategories. But a property's key features are more like a mish-mash of descriptors that are prone to change. Any attempt to organize such features into a hierarchal structure, say by room, may fail because, as one example, some properties may have fireplaces in multiple rooms. Or users may add other features like "spacious", "bright", etc. that are fundamentally different from a fireplace or a balcony. So features are best treated as tags.
You can read more about WordPress taxonomies here: https://wordpress.org/support/article/taxonomies/.
Exporting Taxonomies Directly vs Exporting Posts with Their Taxonomy Data
WP All Export offers two ways to export categories and/or tags: export the posts with just the term name(s) or export the categories/tags directly with all of the term data but without the posts they are attached to.
This guide focuses on exporting categories or tags directly.
Step 1: Create a New Export for WordPress Categories or Tags
Navigate to All Export › New Export:
- Choose Specific Post Type.
- Select Taxonomies.
- Choose one of the category or tag taxonomies from the list. In this example, we're choosing the custom "Product categories" taxonomy. This and many other custom taxonomies (both categories and tags) are added by WooCommerce.
There is one other step not shown in this image: click the blue Customize Export File button at the bottom. This will bring you to the Drag & Drop interface.
Step 2: Configure Your WordPress Category or Tag Columns
When exporting categories or tags, users sometimes require only a subset of the available data fields. You can select this subset in the Drag & Drop interface.
All the available data tables and fields are accessible in the Available Data section on the right.
To export a data field, simply drag it from Available Data to the column selection area as shown below:
To delete an export column, drag it from the column selection area and drop it on any other part of the interface.
WordPress Categories/Tags Tables and Fields
Taxonomies are divided into three subsections in the Available Data section: Standard, Media, and Term Meta.
Export WordPress Standard Fields
The Standard subsection contains the most commonly used term meta.
- Term ID: The term ID, assigned by WordPress
- Term Name: The term's name, which is displayed most commonly on the frontend and in the WordPress admin area
- Term Slug: The term's slug, a database-friendly version of the name
- Description: A description of the term, similar to a post's content
- Parent ID: The ID of the parent term that this term is a child of
- Parent Name: The name of the parent term
- Parent Slug: The slug of the parent term
- Count: The number of posts that are attached to this term
Export Taxonomy Images
The Media subsection 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.
Read more about how to export images from WordPress: https://www.wpallimport.com/documentation/export-wordpress-images/
Export Term Meta
The Term Meta section contains any other custom metadata added to your taxonomies by your theme or plugins. Term meta is automatically detected.
Step 3: Download Your WordPress Categories or Tags
When you've finished configuring your export, click Continue. Verify your export settings, then click Confirm & Run Export.
Once the export is complete, click CSV to download your exported product categories:
The other option here is to click Bundle, which downloads a zip file that includes an import template as well as the export file. The template includes everything that WP All Import needs to import the exported categories or tags, meaning that you can use it as a convenient way to migrate taxonomy data from one site to another.
Because categories and tags are not as intuitive as other types of data, we provide here a quick preview of the Product categories data:
Note the presence of the Parent ID, Parent Name, and Parent Slug columns. This is how WordPress implements the hierarchal structures that we described earlier. For example, if you look at the third data row (Term ID = 22), you can see that it has a parent category of Parent ID = 21, Parent Name = "Heart Shaped", and Parent Slug = "heart-shaped". By coincidence, the parent category in question occupies the row above (Term ID = 21). There are no values in its parent fields because it is at the top of its hierarchy. Note, also, that hierarchies need not have only two levels. You can create as many levels as you need.
Export WordPress Categories or Tags Advanced Topics
Exporting Categories or Tags to Excel or XML
In addition to CSV exports, you can also export categories or tags to Excel or XML.
To export to Excel, open the Drag & Drop interface and...
- Expand the Export Type panel.
- Choose Spreadsheet.
- Select Excel File XLS or Excel File XLSX.
To export to XML:
- Expand Export Type.
- Choose Feed.
- Select Simple XML Feed or Custom XML Feed.
To learn more about custom XML exports, see https://www.wpallimport.com/documentation/export-wordpress-data-to-custom-xml-feed/.
Export WordPress Categories or Tags Advanced Options
For CSV or XML exports, an Advanced Options panel will appear just above the Export Type panel. A CSV export has the following settings:
The Separator field is the character that will be used to separate columns in the export file. The default character is a comma (,) but you can choose any character as long as it is not already present in the export data itself.
Checking the Include header row and column titles in export option means that the first row will consist of column headings. Otherwise, it will simply be the first row of data.
For more information on XML options, see exporting WordPress data to XML.
How to Filter WordPress Categories or Tags for Exports
Filtering categories or tags is not as common as the need to filter other types of export data but it does occur. For example, you may want to export only the subcategories that are associated with a specific parent category.
To do this, expand the Add Filtering Options panel in the New Export screen. Every filter rule has three components: an Element, a Rule, and a Value:
In this case, we are asking to export all the categories with a Parent Name that equals "Heart Shaped", i.e. all the subcategories of the Heart Shaped category.
Click the Add Rule button and you will see that there are 10 such subcategories:
Frequently Asked Questions
What is the Difference Between Categories and Tags Again?
Both categories and tags are WordPress taxonomies, meaning they are meant to classify posts. Categories are broader and are generally used to group posts. Tags are more specific and are generally meant to describe posts.
How to Import Categories or Tags in WordPress?
- Go to All Import -> New Import.
- Choose the method for loading your data (i.e. upload file, use a URL, etc.) and select the file that you want to import.
- Select the import target (e.g. Taxonomies).
- Select the taxonomy that you are targeting (e.g. Product categories).
- Drag and drop the incoming data elements to their target taxonomy fields.
- Complete the import.
For more information, see Import WordPress Taxonomies.
How to Import WordPress Categories or Tags with Posts?
- Configure your WordPress posts import as usual.
- In the Drag & Drop interface, there is a Taxonomies, Categories, Tags section that allows you to specify how to handle incoming categories and tags. Note, there are two ways to handle hierarchal relationships.
- Run the import.
- Verify that the imported categories and/or tags are present and correct.
For more information, see Import WordPress Taxonomies.
How to Migrate WordPress Categories or Tags to Another Website?
- Export the categories or tags that you wish to migrate.
- When the export is complete, download the bundle zipped file instead of a CSV file. The bundle file includes an import template along with your export data file.
- Using WP All Import, import the bundle file on the target site. WP All Import will automatically configure itself based on the import template.
- Run the import.
- Verify that the categories/tags have been correctly imported.
For more information, see Migration Overview.
Export WordPress posts along with their assigned taxonomies (such as categories or tags).
Import metadata into your categories or tags.