How to Export and Import Category / Taxonomy in Wordpress
Tags: wordpress
Published: 2021-05-27 18:56:49

You need to move categories / taxonomies from a website to another, but there are too many of them. More than that, manually creating each category is too time-consuming and easy to make mistakes. Additionally, WordPress does not support export and import taxonomy in default, including category. Sounds freakingly tiring, isn't it? In this case, you should <strong>export and import categories automatically</strong> to save time and avoid making mistakes.

<!--more-->

In this post, I'm gonna tell you <strong>how to use WP Import Export Lite plugin to export categories from a website, then import them to another site</strong>. You can also use this plugin to do the same thing with other taxonomies.

Notably, I just export and import category information like names, descriptions, etc. If you want to export and import data of posts in the category, you can see through <a href="https://gretathemes.com/import-content-data/">this post</a>.

Now, let's get started!

<h2>Export Data of the Category with WP Import Export Lite</h2>

First, you need to <a href="https://gretathemes.com/install-wordpress-plugin/">install and activate the plugin</a>. WP Import Export Lite plugin is free and available on <a href="https://wordpress.org/plugins/wp-import-export-lite/">wordpress.org</a>.

<img class="aligncenter" src="https://i.imgur.com/iSPOYW5.png" alt="WP Import Export lite plugin helps you export data of the category." width="1347" height="625" />

After installing, a new menu named <strong>WP Imp Exp</strong> will show up on the admin sidebar of WordPress.

<img class="aligncenter" src="https://i.imgur.com/6GuuVMu.png" alt="A new menu named WP Imp Exp will show up for creating categories." width="1347" height="625" />

Keep in mind that you need to install WP Import Export Lite on both websites to make it work!

The original website has 6 categories like this:

<img class="aligncenter" src="https://i.imgur.com/wFgaMRR.png" alt="There are 6 categories in default." />

To export a category from this one to the other, go to <strong>WP Imp Exp &gt; New Export</strong> (1).

In the <strong>Choose what to export</strong> section, choose <strong>Taxonomies / Categories / Tags</strong> (2), then choose <strong>Post categories</strong> (3).

After that, click <strong>Customize Export File</strong> (4).

<img class="aligncenter" src="https://i.imgur.com/0IJfC13.png" alt="Choose what to export is Post category." width="1348" height="625" />

Wait a minute for the plugin to export data, then click <strong>Download</strong>:

<img class="aligncenter" src="https://imgur.com/y4CMGfZ.png" alt="Download the export data." width="1366" height="625" />

There I have a <code>.xml</code> file:

<img class="aligncenter" src="https://i.imgur.com/xLHXdtW.png" alt="There is the .xml file that consists of export data." width="629" height="172" />

This file has all data of the category in the original website. What we need to do now is importing it to the target website in the next step.

<h2>Import Data of the Category to WordPress Website with WP Import Export Lite</h2>

Now I will log in the WordPress website that I want to import my category to. Before importing, it only has 2 categories: <strong>Plugin</strong> and <strong>Uncategorized</strong> (a default WordPress category).

<img class="aligncenter" src="https://i.imgur.com/luWwBAr.png" alt="There has only 2 categories in default." />

I have installed WP Import Export Lite on this site, so we will skip the plugin installation step.

To import data of the category to the new website, go to <strong>WP Imp Exp &gt; New Import</strong> and follow these steps:

<h3>Step 1: Choose a File to Import</h3>

Go to menu <strong>WP Imp Exp &gt; New Import</strong>.

Choose <strong>Uploads from Desktop</strong>, upload file <code>.xml</code> that we have just downloaded, and then click <strong>Continue to step 2</strong>.

<img class="aligncenter" src="https://i.imgur.com/JYACOFF.png" alt="Upload file .xml that we have just downloaded." />

<strong>Note:</strong> You can choose an available file from the website or upload it from a URL if you want.

Next, you will be directed to the step 2 screen.

<h3>Step 2: Choose Data to Import</h3>

In the tab <strong>Import each record as</strong>, once again we choose <strong>Taxonomies / Categories / Tags &gt; Post Categories</strong> to import the categories' data:

<img class="aligncenter" src="https://i.imgur.com/vmIUxnl.png" alt="Choose Post categories to import the categories' data." />

In the <strong>Handle New and Existing Items</strong> checkboxes, you have 3 options to import files:

<ul>

   <li><strong>Import new items &amp; Update Existing items</strong></li>

   <li><strong>Import new items only &amp; Skip Existing Items</strong></li>

   <li><strong>Update Existing Items &amp; Skip new items</strong></li>

</ul>

Here I choose <strong>Import new items &amp; Update Existing Items</strong>. After choosing, move to step 3.

<h3>Step 3: Configure the .xml File</h3>

This step includes some advanced options to configure the <code>.xml</code> file, such as <strong>Add Filter, File Options, File Data Preview</strong>. To get more details, you can click <a href="https://www.wpallimport.com/documentation/">here</a>.

These options require some technical knowledge. However, we only need to import normal categories, so you can skip this step and click<strong> Continue to Step 4</strong>.

<img class="aligncenter" src="https://i.imgur.com/qgoHUhm.png" alt="There are some advanced options to configure the export data file." width="1350" height="625" />

<h3>Step 4: Choose Content to Import in the Category</h3>

WP Import Export Lite plugin supports importing a lot of content types like names, descriptions, images, ... But as I have said before, I only import the category's name and description.

First, go to <strong>Field Mapping &gt; Name &amp; Description</strong>. Next, drag and drop the <strong>termname</strong> and <strong>description</strong> tags to assign them to the category, then click <strong>Continue to Step 5</strong> like what I do in the gif below:

<img class="aligncenter" src="https://i.imgur.com/TkCAi7D.gif" alt="Drag and drop the termname and description tags to assign them to the category" />

<h3>Step 5: Optimize Importing Speed</h3>

In <strong>Import Speed Optimization</strong>, you have 2 options:

<ul>

   <li><strong>High Speed Small File Processing</strong></li>

   <li><strong>Iterative, Piece-by-Piece Processing</strong>: divide a file into small parts and process one by one. If your file is too large and consumes a lot of time to process, you should choose this option.</li>

</ul>

Here I choose <strong>High Speed Small File processing</strong>. After that, click <strong>Continue</strong>.

<img class="aligncenter" src="https://i.imgur.com/nzBUiH2.png" alt="You have 2 options to customize import speed iptimization." />

Finally, click <strong>Confirm and Run Import</strong>:

<img class="aligncenter" src="https://i.imgur.com/kD9clUg.png" alt="Click Confirm and Run Import" />

After having it done, the importing report will show up like this:

<img class="aligncenter" src="https://i.imgur.com/bCu5K2g.png" alt="Here is importing category report." width="1348" height="625" />

Now I will check the result by going to <strong>Post &gt; Categories</strong>:

<img class="aligncenter" src="https://i.imgur.com/ifflWSY.png" alt="You can check the result by going to Post &gt; Categories." />

As you can see in the above image, beside the default categories Plugin and Uncategorized, my new categories have been added with descriptions.

<h2>Last Words</h2>

Exporting and importing categories become extremely easy with WP Import Export Lite plugin. If you follow this tutorial strictly, you will definitely make it done.

In addition to category, tags are also helpful tools to help web owners categorize and organize posts. You can combine using tags and categories to manage your post effectively like the tutorial in <a href="https://gretathemes.com/use-tags-and-categories-effectively-for-wordpress-website/">this post</a>.