PHPackages                             rapidwebltd/uxdm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rapidwebltd/uxdm

ActiveLibrary

rapidwebltd/uxdm
================

UXDM helps developers migrate data from one system or format to another.

v1.23.0(8y ago)15281LGPL-3.0-onlyPHP

Since May 12Pushed 8y ago3 watchersCompare

[ Source](https://github.com/rapidwebltd/uxdm)[ Packagist](https://packagist.org/packages/rapidwebltd/uxdm)[ RSS](/packages/rapidwebltd-uxdm/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (8)Versions (46)Used By (1)

🔀 Universal Extensible Data Migrator (UXDM)
===========================================

[](#-universal-extensible-data-migrator-uxdm)

[![Build Status](https://camo.githubusercontent.com/a7269963b67b7d04ce35a2734442a4d02d75c314e41bfd2aaf1084eb395a1c89/68747470733a2f2f7472617669732d63692e6f72672f72617069647765626c74642f7578646d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rapidwebltd/uxdm)[![Coverage Status](https://camo.githubusercontent.com/1ed738903314f755fa1f0eb6126b644c55b063c187322bc95cae8066cfe5d532/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f72617069647765626c74642f7578646d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/rapidwebltd/uxdm?branch=master)[![StyleCI](https://camo.githubusercontent.com/6d68e9637255091331e9ede987fa02b7b525b6881554f98da47ac7d8610023dc/68747470733a2f2f7374796c6563692e696f2f7265706f732f39303937343032352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/90974025)[![Packagist](https://camo.githubusercontent.com/a1367cb4789f9f52fa9c092d4564778cbfa0026166bdc9b2048470ccc77eedcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72617069647765626c74642f7578646d2e737667)](https://camo.githubusercontent.com/a1367cb4789f9f52fa9c092d4564778cbfa0026166bdc9b2048470ccc77eedcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72617069647765626c74642f7578646d2e737667)

UXDM helps developers migrate data from one system or format to another.

Installation
------------

[](#installation)

UXDM can be easily installed using Composer. Just run the following command from the root of your project.

```
composer require rapidwebltd/uxdm

```

If you have never used the Composer dependency manager before, head to the [Composer website](https://getcomposer.org/) for more information on how to get started.

Migrations
----------

[](#migrations)

Each UXDM migration requires a source object and at least one destination object. These determine where and how data is read and written. The UXDM package comes with a variety of source and destination objects, including the following.

- PDO (PHP Database Object) Source &amp; Destination
- CSV (Comma Seperated Values) Source &amp; Destination
- Associative Array Source &amp; Destination
- JSON Files Source &amp; Destination
- XML Source &amp; Destination
- WordPress Post Source
- WordPress User Source
- Debug Output Destination

Source and destination objects can be used in any combination. Data can be migrated from a CSV and inserted into a database, just as easily as data can be migrated from a database to a CSV.

You can also use similar source and destination objects in the same migration. For example, a common use of UXDM is to use a PDO source and PDO destination to transfer data from one database to another.

Please see the [Sources &amp; Destinations](/docs/uxdm-sources-and-destinations.md) page for more detailed documentation on their usage.

Examples
--------

[](#examples)

### Database to database migration

[](#database-to-database-migration)

An example of a basic database to database UXDM migration is shown below.

```
$pdoSource = new PDOSource(new PDO('mysql:dbname=old-test;host=127.0.0.1', 'root', 'password123'), 'users');

$pdoDestination = new PDODestination(new PDO('mysql:dbname=new-test;host=127.0.0.1', 'root', 'password456'), 'new_users');

$migrator = new Migrator;
$migrator->setSource($pdoSource)
         ->setDestination($pdoDestination)
         ->setFieldsToMigrate(['id', 'email', 'name'])
         ->setKeyFields(['id'])
         ->migrate();
```

This migration will move the `id`, `email` and `name` fields from the the `users` table in the `old-test` database, to the `new_users` table in the `new-test` database, replacing any existing records with the same `id` (the key field).

### Mapping field names from source to destination

[](#mapping-field-names-from-source-to-destination)

This examples shows how UXDM can map field names from source to destination.

```
$migrator = new Migrator;
$migrator->setSource($pdoSource)
         ->setDestination($pdoDestination)
         ->setFieldsToMigrate(['id', 'email', 'name'])
         ->setKeyFields(['id'])
         ->setFieldMap(['name' => 'full_name'])
         ->migrate();
```

This migration will move data from the source `name` field into the destination `full_name` field, while still moving the `id` and `email` fields normally.

### Modifying data items during migration

[](#modifying-data-items-during-migration)

The following example shows how you can use UXDM to modify items of data during the migration process.

```
$migrator = new Migrator;
$migrator->setSource($pdoSource)
         ->setDestination($pdoDestination)
         ->setFieldsToMigrate(['id', 'email', 'name'])
         ->setKeyFields(['id'])
         ->setDataItemManipulator(function($dataItem) {
            if ($dataItem->fieldName=='name') {
                $dataItem->value = strtoupper($dataItem->value);
            }
         })
         ->migrate();
```

This migration will move user data between two databases. However, it will also convert the value in the `name` field to uppercase.

### Modifying data rows during migration

[](#modifying-data-rows-during-migration)

#### Adding data items

[](#adding-data-items)

This examples shows how UXDM can modify each row of data while the migration is taking place.

```
$migrator = new Migrator;
$migrator->setSource($pdoSource)
         ->setDestination($pdoDestination)
         ->setFieldsToMigrate(['id', 'email', 'name'])
         ->setKeyFields(['id'])
         ->setDataRowManipulator(function($dataRow) {
            $dataRow->addDataItem(new DataItem('random_number', rand(1,1000)));
         })
         ->migrate();
```

This migration will add a random number into a field called `random_number` for each row of data. This will then be migrated to the destination database along with the other fields.

#### Removing data items

[](#removing-data-items)

This example demonstrates how data items can be removed from a data row. You may wish to do this if you want to use its value, but not actually migrate it to the destination.

```
$migrator = new Migrator;
$migrator->setSource($pdoSource)
         ->setDestination($pdoDestination)
         ->setFieldsToMigrate(['id', 'email', 'name'])
         ->setKeyFields(['id'])
         ->setDataRowManipulator(function($dataRow) {
            $emailDataItem = $dataRow->getDataItemByFieldName('email');
            $dataRow->addDataItem(new DataItem('email_hash', md5($emailDataItem->value)));
            $dataRow->removeDataItem($emailDataItem);
         })
         ->migrate();
```

This migration gets the data from the `email` field in the source, creates a new `email_hash` data item which contains an md5 of the email address, and then removes the original `email` data item. This new `email_hash` will then be migrated to the destination database along with the other fields, excluding the removed `email` field.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

45

Last Release

2947d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (25 commits)")[![kirsty-gasston](https://avatars.githubusercontent.com/u/12949343?v=4)](https://github.com/kirsty-gasston "kirsty-gasston (1 commits)")

---

Tags

data-migrationphpphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rapidwebltd-uxdm/health.svg)

```
[![Health](https://phpackages.com/badges/rapidwebltd-uxdm/health.svg)](https://phpackages.com/packages/rapidwebltd-uxdm)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
