> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/integrations/wp-all-import.md).

# WP All Import

How to import ACPT meta fields and CCT table records with WP All Import

ACPT has a specific integration with [WP All Import](https://www.wpallimport.com/), our favorite way to import into WordPress. It ships as an **ACPT Add-on** box that appears in the import wizard for custom post types, taxonomies, and users, and reads back the XML produced by the [WP All Export](/integrations/wp-all-export.md) integration.

### Step 1. Import the data

Go to WP All Import and select the XML obtained from the [WP All Export](/integrations/wp-all-export.md) tutorial. Select import Movies:

<figure><img src="https://3235524095-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fiyf0tSKPgXiyoQ3zV3I6%2Fuploads%2FyycdX1VIGWmsSDnXG7RB%2Fwpai_4.png?alt=media&amp;token=57a009b2-5103-4c13-9f53-0dadcd18473c" alt=""><figcaption></figcaption></figure>

Go straight to **Step 3** and drag your data.

Note the **ACPT Add-on** box, which contains an **ACPT meta** text field. Drag here the node produced by `wpae_acpt_export_all_fields()` (or the taxonomy/user equivalent):

<figure><img src="https://3235524095-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fiyf0tSKPgXiyoQ3zV3I6%2Fuploads%2Fgit-blob-187fefb09482fd5be3ec96dc6155f1c55521d0d1%2Fwpai_6.png?alt=media" alt=""><figcaption></figcaption></figure>

Complete the import and every meta field will be present in the imported posts, terms, or users — the same ACPT Add-on box is available regardless of which type you're importing.

## Importing CCT table records

The same ACPT Add-on box also has an **ACPT table records** field. Drag here the XML node produced by `wpae_acpt_export_all_table_records()` (or the taxonomy/user equivalent, see [WP All Export](/integrations/wp-all-export.md#exporting-cct-table-records-beta)):

<figure><img src="https://3235524095-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fiyf0tSKPgXiyoQ3zV3I6%2Fuploads%2Fgit-blob-9320b554e16c04478d2ae0f54addbf0ac9f40fbb%2Fwpai_7.png?alt=media" alt=""><figcaption></figcaption></figure>

On import, ACPT parses the `<acpt_table_records>` XML and, for every `<table>` node, looks up the table by name on the **target** site. The table must already exist there — either created manually with the [Table builder](/custom-content-types/tables.md), or restored beforehand via [Import settings](/tools/import-data.md).

A host (post, term, or user) can be linked to **at most one record per table** — the same constraint that applies in the CCT record editor itself. For each `<table>` node, ACPT checks whether the target host already has a record there: if so, it's **updated in place**; otherwise a **new record is created** and linked to the host via the table's location rule.

{% hint style="info" %}
The exported `<record id="X">` is the *source* environment's ID and is purely informational — it's meaningless once copied to another install, so the importer ignores it entirely and relies on the host lookup described above instead.
{% endhint %}

### Example

Continuing the Movie/`review`+`specs` example from [WP All Export](/integrations/wp-all-export.md#example): importing the XML below against a Movie with no existing `review` or `specs` record creates one new record in each table, linked to the newly imported Movie:

```xml
<acpt_table_records belongsTo="customPostType">
  <table name="review">
    <record id="12">
      <column name="author" type="scalar">Jane Doe</column>
      <column name="rating" type="scalar">5</column>
    </record>
  </table>
  <table name="specs">
    <record id="7">
      <column name="runtime_minutes" type="scalar">128</column>
      <column name="aspect_ratio" type="scalar">2.39:1</column>
    </record>
  </table>
</acpt_table_records>
```

Re-running the same import updates those same two records in place instead of creating duplicates.

{% hint style="info" %}
Unlike the export side, this field does not check the CCT license/feature flag directly — it simply looks up each `<table>` node by name on the target site. In practice this means the table must already exist there, which requires CCT to have been enabled when it was created. If a table isn't found, that node is silently skipped and the rest of the import continues.
{% endhint %}
