{ "name": "MU Migration", "slug": "mu-migration", "version": "0.5.0", "download_url": "https://gitea.mulligan.casa/wordpress/wp-updates/raw/branch/main/mu-migration/mu-migration-0.5.0.zip", "homepage": "https://gitea.mulligan.casa/wordpress/mu-migration", "requires": "6.1", "tested": "7.0", "requires_php": "8.1", "last_updated": "2026-09-30 18:27:16", "author": "Mike Mulligan", "author_homepage": "https://gitea.mulligan.casa/mmulligan", "tags": [ "multisite", "migration", "wp-cli", "export", "import" ], "sections": { "description": "

MU Migration adds a wp mu-migration command family to WP-CLI. It exports a site's tables, users, and optionally its plugins, themes and uploads into one zip package, then imports that package into a multisite network as a new or existing subsite, or into a single site. On import it rewrites the table prefix, remaps user ids into the network's shared users table, runs the URL and uploads-path search-replaces, and performs the housekeeping a moved site needs.

\n

This is a maintained fork of MU-Migration, created by Nícholas André at 10up and archived on 2 March 2026. The fork runs on current PHP, ships as an ordinary plugin with self-hosted updates, and plans every run before it does anything.

\n

Commands

\n\n

Plan, refuse, confirm, apply

\n

Every command first builds a plan by running its real logic against recording executors: reads are real, and every write becomes a plan step with its exact arguments. The dump is copied, rewritten and scanned inside a private work directory, and each search-replace runs as wp search-replace --dry-run --report so the plan carries real counts. The plan is printed before anything is applied.

\n\n

Acknowledgement flags

\n\n

Two more flags request behaviour that is off by default, and the confirmation lists them: --dangerously-allow-guid-rewrite (search-replaces otherwise always skip the guid column) and --dangerously-allow-database-redirects (dumps with USE, database-qualified names or a REFERENCES into another database are otherwise refused; allowing them prints a DANGER warning even under --quiet, because such statements can write outside the backed-up database).

\n

Every flag is bare: a value or a --no- negation is refused. Former spellings, such as --blog_id or --allow-drop-tables, are refused with the name that replaced them.

\n

Safety behaviour

\n\n

Recovery after a failure is printed guidance, never executed. Its restore of the backup is wp db import - < '<backup>', run from a shell, so the restore also stops at the first statement that fails. A failed filesystem step names its cause (a missing file, a directory the tool cannot write) without a PHP warning printed above it. Full usage is documented in the repository README.

", "installation": "
    \n
  1. Upload the plugin to wp-content/plugins/ and activate it. On multisite, network activate it so the command is available for every site.
  2. \n
  3. Install it on both the site you are moving and the network you are moving it to.
  4. \n
  5. Run wp mu-migration info to confirm the command is registered.
  6. \n
\n

Requires PHP 8.1 or newer with the zip extension, WordPress 6.1 or newer, and WP-CLI with a mysql or mariadb client that can log in to the database server: the import, the backup and the export run WP-CLI's wp db commands. The MariaDB 11.8 client in the official WP-CLI Docker image cannot load caching_sha2_password, MySQL 8's default; against such a server, use a mysql_native_password database user or a MySQL client. There are no runtime Composer dependencies.

\n

Updates are delivered through the Update URI header and the Manifest Updater plugin.

", "changelog": "

0.5.0
\n* Breaking: users travel in users.json (format 2) instead of users.csv. A users.csv, or a package from before 0.5.0, is refused: re-export it with this version.
\n* Breaking: the mu_migration/export/user/headers filter is removed; what the mu_migration/export/user/data filter returns travels without it.
\n* Breaking: every option has one hyphenated spelling (--blog-id, --new-url, --old-url …); the underscore forms 0.4.0 took are refused, naming the new one. Flags take no value and cannot be negated.
\n* Breaking: import tables and import users require --blog-id; import all requires --new-url or --same-url; import tables requires --old-url with --new-url, or --same-url. Without --blog-id, the exports read the site WP-CLI runs against, not blog 1.
\n* Breaking: a live run that changes anything asks for confirmation (--yes skips it) and is refused when nobody could answer, and each dangerous effect needs its own acknowledgement flag (--allow-main-site, --dangerously-allow-drop-tables and the others listed above).
\n* Every run is planned first and the plan printed; --dry-run stops there. --format=json prints the plan and outcome as JSON Lines.
\n* An import backs up the target site's own tables first and, when a step fails, prints recovery commands. The dump is fed to the database client on standard input, so the first failed statement fails the import, and row counts are verified afterwards.
\n* The table prefix is rewritten in PHP on a copy of the dump, and every dump statement is held to a shape a dump tool writes. Network tables and other sites' tables are never exported, imported or search-replaced unless asked.
\n* Users keep every role and every usermeta row, byte for byte, plus capabilities granted outside a role. Application passwords no longer travel. An existing user's role is kept unless you pass --dangerously-allow-role-overwrite.
\n* Plugins and themes are installed only with --plugins and --themes, never over an installed copy; uploads are merged without replacing files.
\n* Many fixes: raw PHP warnings replaced by errors that name their cause, safer package and work-directory handling, and exact recovery lines. The full list is in the repository's CHANGELOG.md.

\n

0.4.0
\n* Forked from 10up/MU-Migration at its final commit. Packaged as a WordPress plugin with self-hosted updates.
\n* Runs on PHP 8.1 through 8.5: the abandoned zip library is replaced by PHP's ZipArchive, CSV calls pass the escape argument PHP 8.4 requires, and site creation uses wp_insert_site. Compatibility work by Brandon Kraft.
\n* Fixed site creation reporting id 0 for every new site.
\n* PHP floor raised from 7.1 to 8.1. Runtime Composer dependencies removed.
\n* Dead code and the retired Travis configuration removed.

" } }