/ Blog / Tutorials / How to Import and Export WordPress Custom Post Types (Step-by-Step Guide)

How to Import and Export WordPress Custom Post Types (Step-by-Step Guide)

Jun 11, 2024

If you work with WordPress regularly, you’re probably aware of the fact that the default post types can be very limiting for websites and businesses with specific needs. This is where custom post types come in, allowing you to create a structured framework to store and present data on your WordPress website outside the standard “Posts” or “Pages” framework. 

For example, “Products” is one of the most common custom post types because it has different characteristics and requires more specific information that would be time-consuming to configure in a default WordPress post or page (e.g., fields for product image, product description, pricing, etc.).

There are plenty of WordPress plugins to help you create custom post types, but if you need to use that data elsewhere – for example, if you’re planning a site migration or want to analyze it using third-party software – you’ll need to know how to export (and import) it. 

In this article, we’ll discuss the different ways of exporting and importing custom post types and introduce you to a tool that will improve your WordPress data management. 

Let’s begin! 

How to export WordPress custom post types

The WordPress built-in export functionality works with custom post types, and it’s a suitable option if you’re planning a site migration because it exports the data to an Extensible Markup Language (XML) file. 

Here is what you need to do:

  1. Go to Tools > Export
  2. Select the radio button next to the custom post type you created and click Download Export File.
Exporting custom post types to XML with WordPress

This method is quite easy but it’s very limited. The XML format is great for site migrations, but less useful beyond that, so if you want to analyze your data or use it with third-party tools, you’ll likely want to export it as a CSV file instead. Another major limitation of this method is the fact that you can’t segment the data prior to exporting it – it’s all or nothing. 

Plugins that come with native custom post types often provide built-in exporting options, but if you’re working with several custom post types, this might mean you’ll be juggling multiple different export processes. This is why it’s better to add a specialized data management and exporting plugin like Admin Columns that will work with every single post type. 

Exporting custom post types with Admin Columns

Admin Columns Homepage

Managing and exporting custom post types can seem daunting, but with Admin Columns, the process becomes manageable and efficient. With an intuitive interface, the plugin allows you to handle vast amounts of data, ensuring your website’s backend operations are as smooth as those on the frontend.

Here is what you can do with Admin Columns: 

  1. Export all WordPress data as a CSV file: Easily export data from any list table, including those for custom post types, in a versatile CSV format. This is perfect for when you need to analyze your data outside of WordPress or migrate it to another site.

  2. Customize data for display and export: Tailor the data displayed in your custom post types list table to suit your needs by adding, removing, and reordering columns. Whether it’s custom field data or standard post information, you can organize and export it directly from the list table view.

    Adding a new column to an export view
  3. Filter custom post type data: Hone in on the specific data you need by filtering your custom post types by nearly any field or condition. This makes it exceptionally easy to segment and export exactly what you require.

    Adding filters to custom post data with Admin Columns
  4. Integrate with popular plugins: Admin Columns works seamlessly with widely-used plugins such as Toolset Types, Pods, and WooCommerce. These integrations facilitate the management, update, and export of third-party custom post type data effortlessly.

  5. Edit custom post type data: Quickly adjust your data without extensive back-and-forth navigation. Admin Columns allows for both quick inline and bulk edits right from the list table, streamlining your data management process.

Bulk editing custom post data with Admin Columns
Bulk editing custom post data with Admin Columns
Inline editing custom post data with Admin Columns
Inline editing custom post data with Admin Columns

So, how can you export custom post types with Admin Columns? The process is very simple: 

  1. Go to the Admin Columns settings.

    Admin Columns settings
  2. Choose the list table you want to edit.

    Selecting a list table from the Admin Columns column editor.
  3. Scroll down to the table view settings and toggle the export function.

    Toggling the export function in the table view settings
  4. Go back to the list table and click the Export button.

    Clicking the export button on the list table
  5. Remove or rearrange columns as needed and click Export again.

    Exporting a custom post type table to CSV
  6. Your data will be immediately exported to a handy CSV file.

    Example of a CSV table

Importing custom post types: Tips for a smooth transition

If you’re looking to migrate your custom post type data to a different WordPress site, mastering the import process is just as crucial as the export. Thankfully, WordPress is designed with versatility in mind, offering native support for importing data through XML files. This feature is particularly handy for transferring custom post type data between sites, ensuring your valuable content transitions smoothly and efficiently.

Here’s a step-by-step guide to importing your custom post type data into a new WordPress site:

1. Prepare your new site for import

  • For custom post types created with code: If you’ve created your custom post types by adding code to your theme’s functions.php file, you’ll need to replicate this setup on your new site by copying the code to the same file in the new site’s theme.

  • For plugin-created post types: If you used a plugin for the job, like the Custom Post Types UI, you have to install and set up the same custom post types on your new site by configuring the plugin as you had previously.

  • For automatically created post types: If your custom post type comes courtesy of a specific plugin (like WooCommerce, which generates a “Products” post type), simply ensure the plugin is active on your new site.

2. Initiate the import process:

  • Navigate to Tools > Import on your WordPress dashboard to view the available importing options.

    Tools Import function

3. Install and run the WordPress Importer:

  1. If you haven’t used it before, you’ll see an option to install the WordPress Importer. Click on Run Importer after installation.

    WordPress Importer tool

4. Upload and import your XML File:

  1. Select the XML file that contains your exported custom post type data and click Upload file and import to start the process.

    Importing the XML file to WordPress Importer
  2. WordPress will then proceed to import your custom post type data into your new site.

Take the next step in WordPress content management

While WordPress’s default capabilities offer a straightforward approach for exporting custom post type data as an XML file, this method might not suffice for more complex needs. Specifically, if you require your data in a different format or wish to filter and segment the data for export, WordPress’s built-in functions may fall short. This is where Admin Columns proves to be a game-changer.

Admin Columns elevates WordPress content management, providing greater control over how you display, manage, and export custom post type data. Its ability to export data in CSV format, customize data displays, filter data intricately, and integrate with popular plugins like WooCommerce makes it a valuable tool for any WordPress site operator.

Take the next step in managing and exporting your WordPress custom post type data with Admin Columns. Discover the efficiency and ease it brings to your website’s data management and make the most out of your WordPress experience.

Get Admin Columns Pro

Effortlessly sort, filter, edit, export, and organize content in the WordPress admin.

$ 99 / year