---
title: "Add a Custom Migration Source with nxt/import_sources"
url: https://nexterwp.com/docs/nxt-import-sources-filter/
date: 2026-11-12
modified: 2026-11-12
lang: en
author: "Aditya Sharma"
description: "The import screen offers the sources Nexter ships with. nxt/import_sources lets you add your own, so a bespoke or in-house field system can be imported the same way. What It..."
image: https://nexterwp.com/wp-content/uploads/2026/09/nxt-import-sources-filter-1024x519.jpg
word_count: 322
---

# Add a Custom Migration Source with nxt/import_sources

The import screen offers the sources Nexter ships with. `nxt/import_sources` lets you add your own, so a bespoke or in-house field system can be imported the same way.

## What It Does

The filter receives the array of registered sources. Adding an entry puts it on the import screen alongside the built-in ones.

## Before You Start

- Nexter Extension 4.9.0 or later.- A source whose data you can read in PHP.- An understanding of the shape Nexter expects — read the built-in adapters before writing your own.

## Register a Source

- Add a filter on `nxt/import_sources`.

![The Import Data button, which lists the sources this filter extends](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-s-import-data-button.webp)

- Append your source to the array and return it.

- Implement the reading and mapping your source needs.

- Test on a copy of a real site, then **verify the values** against the source before trusting it.

## When to Use It

- Importing from an in-house or bespoke field system.- Adding a source Nexter does not ship an adapter for.- Building a one-off migration path for a single client site.

## Display the Value

Adding a source to the list:

`<?php
add_filter( 'nxt/import_sources', function ( $sources ) {
$sources[] = array(
'slug' => 'my_legacy_fields',
'label' => 'Our Legacy Fields',
);
return $sources;
} );`

## Limitations

- Registering a source only puts it on the screen. The reading and mapping is yours to implement — the filter does not give you that for free.- The built-in adapters are the reference for the expected shape. Read them before writing one.- A migration that reports success is not evidence the data arrived. Verify values on real posts, every time.

## Troubleshooting

### My source appears but the scan finds nothing

Registering the source is only the first half. The scan needs your implementation to report what it found.

### Should I write an adapter or a one-off script?

For a single site, a one-off script is usually simpler and easier to verify. An adapter earns its keep when you will run the same migration repeatedly.

## Related Docs

- [Migration overview](https://nexterwp.com/docs/migrate-custom-fields-to-nexter/)- [After migrating: verify your data](https://nexterwp.com/docs/verify-custom-field-migration/)- [Content Fields hooks reference](https://nexterwp.com/docs/nexter-fields-hooks-reference/)