release mu-migration 0.6.0
This commit is contained in:
1 parent
b905747564
commit
b58804139d
3 files changed
+5
-5
No files matched your search
+5
-5
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "MU Migration",
|
||||
"slug": "mu-migration",
|
||||
"version": "0.5.2",
|
||||
"download_url": "https://gitea.mulligan.casa/wordpress/wp-updates/raw/branch/main/mu-migration/mu-migration-0.5.2.zip",
|
||||
"version": "0.6.0",
|
||||
"download_url": "https://gitea.mulligan.casa/wordpress/wp-updates/raw/branch/main/mu-migration/mu-migration-0.6.0.zip",
|
||||
"homepage": "https://gitea.mulligan.casa/wordpress/mu-migration",
|
||||
"requires": "6.1",
|
||||
"tested": "7.0",
|
||||
"requires_php": "8.1",
|
||||
"last_updated": "2026-10-05 03:25:23",
|
||||
"last_updated": "2026-10-06 19:50:32",
|
||||
"author": "Mike Mulligan",
|
||||
"author_homepage": "https://gitea.mulligan.casa/mmulligan",
|
||||
"tags": [
|
||||
@@ -18,8 +18,8 @@
|
||||
"import"
|
||||
],
|
||||
"sections": {
|
||||
"description": "<p>MU Migration adds a <code>wp mu-migration</code> 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.</p>\n<p>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.</p>\n<p><strong>Commands</strong></p>\n<ul>\n<li><code>wp mu-migration export all <zip></code> exports tables, users and meta data, plus <code>--plugins</code>, <code>--themes</code> and <code>--uploads</code> when asked. The <code><zip></code> is required.</li>\n<li><code>wp mu-migration export tables <file></code> and <code>export users <file></code> export one piece at a time; the <code><file></code> is required.</li>\n<li>Every export reads one site: <code>--blog-id</code>, or without it the site WP-CLI runs against (<code>--url</code>, or the main site).</li>\n<li><code>wp mu-migration import all <zip></code> imports a package: into a new subsite at <code>--new-url</code> (or the package's own address with <code>--same-url</code>), or over an existing site with <code>--blog-id</code>. <code>--uid-fields</code> and <code>--uid-columns</code> name the post-meta keys and the plugin table columns that hold user ids. <code>--upload-collisions=keep</code> or <code>--upload-collisions=replace</code> says what to do with a package upload already on the site with other content, which otherwise refuses the import. <code>--installed-versions=keep</code> or <code>--installed-versions=replace</code> says what to do with a requested plugin or theme installed at another version than the package's copy, which otherwise refuses it too. Each <code>replace</code> needs <code>--backup-dir</code>, and replacing a plugin or theme another site of the network runs needs <code>--dangerously-allow-shared-code-replace</code>.</li>\n<li><code>wp mu-migration import tables <file> --blog-id=<id></code> and <code>import users <file> --blog-id=<id> --map-file=<map></code> import one piece at a time; <code>--map-file</code> is required and names where the old-id to new-id map is written.</li>\n<li><code>wp mu-migration posts update_author <map> --blog-id=<id></code> remaps post authors, comment authors, <code>--uid-fields</code> post meta and the <code>--uid-columns</code> columns (<code>--uid-columns=em_events.event_owner</code>) to the new user ids.</li>\n<li><code>wp mu-migration users update_passwords</code> sets or resets passwords after a move.</li>\n<li><code>wp mu-migration info</code> prints the tool's version.</li>\n</ul>\n<p><strong>Plan, refuse, confirm, apply</strong></p>\n<p>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 <code>wp search-replace --dry-run --report</code> so the plan carries real counts. The plan is printed before anything is applied.</p>\n<ul>\n<li><code>--dry-run</code> stops there and closes with <code>Dry run: N steps planned; this tool wrote nothing outside its private work directory, which is removed when this run ends.</code> The site's own code can still write: WP-CLI loads the site's theme and plugins, and an import into an existing site previews each search-replace in a child that loads the target site's theme and plugins, which may write as any request to the site would. The closing line, the step, a declined confirmation's <code>Cancelled</code> line and a refusal say so when a preview ran. Before a dry run on a site whose code writes when it loads, back up its tables or rehearse on a copy.</li>\n<li>A step that is dangerous needs its own acknowledgement flag. A live run missing one is refused before any step is applied, naming each flag and the steps that need it; a dry run reports the same list as a warning.</li>\n<li>A live run with anything to change prints a confirmation naming the target, the guarded effects, the flags given and the backup, then asks <code>Continue?</code>. <code>--yes</code> skips the question and acknowledges nothing.</li>\n<li>A live run that would ask is refused when nobody could answer: under <code>--quiet</code>, or when standard input is not an interactive terminal. A live <code>--format=json</code> run needs <code>--yes</code>.</li>\n<li>The plan is applied step by step. The first failure stops the run, names the step and prints recovLine truncated
|
||||
"description": "<p>MU Migration adds a <code>wp mu-migration</code> 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.</p>\n<p>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.</p>\n<p><strong>Commands</strong></p>\n<ul>\n<li><code>wp mu-migration export all <zip></code> exports tables, users and meta data, plus <code>--plugins</code>, <code>--themes</code> and <code>--uploads</code> when asked. The <code><zip></code> is required.</li>\n<li><code>wp mu-migration export tables <file></code> and <code>export users <file></code> export one piece at a time; the <code><file></code> is required.</li>\n<li>Every export reads one site: <code>--blog-id</code>, or without it the site WP-CLI runs against (<code>--url</code>, or the main site).</li>\n<li><code>wp mu-migration import all <zip></code> imports a package: into a new subsite at <code>--new-url</code> (or the package's own address with <code>--same-url</code>), or over an existing site with <code>--blog-id</code>. <code>--uid-fields</code> and <code>--uid-columns</code> name the post-meta keys and the plugin table columns that hold user ids. <code>--upload-collisions=keep</code> or <code>--upload-collisions=replace</code> says what to do with a package upload already on the site with other content, which otherwise refuses the import. <code>--installed-versions=keep</code> or <code>--installed-versions=replace</code> says what to do with a requested plugin or theme installed at another version than the package's copy, which otherwise refuses it too. Each <code>replace</code> needs <code>--backup-dir</code>, and replacing a plugin or theme another site of the network runs needs <code>--dangerously-allow-shared-code-replace</code>.</li>\n<li><code>wp mu-migration import tables <file> --blog-id=<id></code> and <code>import users <file> --blog-id=<id> --map-file=<map></code> import one piece at a time; <code>--map-file</code> is required and names where the old-id to new-id map is written.</li>\n<li><code>wp mu-migration posts update_author <map> --blog-id=<id></code> remaps post authors, comment authors, link owners (<code>links.link_owner</code>), each post's last editor (<code>_edit_last</code>), <code>--uid-fields</code> post meta and the <code>--uid-columns</code> columns (<code>--uid-columns=em_events.event_owner</code>) to the new user ids. <code>import all</code> remaps the same.</li>\n<li><code>wp mu-migration users update_passwords</code> sets or resets passwords after a move.</li>\n<li><code>wp mu-migration info</code> prints the tool's version.</li>\n</ul>\n<p><strong>Plan, refuse, confirm, apply</strong></p>\n<p>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 <code>wp search-replace --dry-run --report</code> so the plan carries real counts. The plan is printed before anything is applied.</p>\n<ul>\n<li><code>--dry-run</code> stops there and closes with <code>Dry run: N steps planned; this tool wrote nothing outside its private work directory, which is removed when this run ends.</code> The site's own code can still write: WP-CLI loads the site's theme and plugins, and an import into an existing site previews each search-replace in a child that loads the target site's theme and plugins, which may write as any request to the site would. The closing line, the step, a declined confirmation's <code>Cancelled</code> line and a refusal say so when a preview ran. Before a dry run on a site whose code writes when it loads, back up its tables or rehearse on a copy.</li>\n<li>A step that is dangerous needs its own acknowledgement flag. A live run missing one is refused before any step is applied, naming each flag and the steps that need it; a dry run reports the same list as a warning.</li>\n<li>A live run with anything to change prints a confirmation naming the target, the guarded effects, the flags given and the backup, then asks <code>Continue?</code>. <code>--yes</code> skips the question and acknowledges nothing.</li>\n<li>A live run that would ask is refused when nobody could answer: under <code>--quiet</code>, or when standard input is not an interactive terminal. A live <code>--format=json</code> rLine truncated
|
||||
"installation": "<ol>\n<li>Upload the plugin to <code>wp-content/plugins/</code> and activate it. On multisite, network activate it so the command is available for every site.</li>\n<li>Install it on both the site you are moving and the network you are moving it to.</li>\n<li>Run <code>wp mu-migration info</code> to confirm the command is registered.</li>\n</ol>\n<p>Requires PHP 8.1 or newer with the <code>zip</code> extension, WordPress 6.1 or newer, and WP-CLI with a <code>mysql</code> or <code>mariadb</code> client that can log in to the database server: the import, the backup and the export run WP-CLI's <code>wp db</code> commands. The MariaDB 11.8 client in the official WP-CLI Docker image cannot load <code>caching_sha2_password</code>, MySQL 8's default; against such a server, use a <code>mysql_native_password</code> database user or a MySQL client. There are no runtime Composer dependencies.</p>\n<p>Updates are delivered through the <code>Update URI</code> header and the Manifest Updater plugin.</p>",
|
||||
"changelog": "<p><strong>0.5.2</strong></p>\n<ul>\n<li>Breaking: a single site's tables named the prefix, a number and an underscore (<code>wp_404_to_301</code>, <code>wp_2024_archive</code>) are exported like its others; they were left out without a word, and refused when named. Those whose number's tables include a core or network table name (<code>wp_2_posts</code>, <code>wp_2_users</code>) are another site's or install's: left out, and named in the plan.</li>\n<li>On a network, blog 1 still leaves such tables out by default, and the plan now names each with its reason: a registered site's (counted per site), another site's or install's, or one that may be the site's own.</li>\n<li>Breaking: <code>--tables</code> and <code>--non-default-tables</code> may name any of them but a registered site's (a single site has none), and the plan says it was included by name; naming a registered site's table is refused in new words. <code>posts update_author --uid-columns</code> on such a table says so too. An import into blog 1 or a single site refuses such a table unless <code>--tables</code> names it, and the plan names every one a dump brings.</li>\n<li>Breaking: <code>export all --uploads</code> from the uploads root as WordPress computes it for the network the command runs on (the main network's main site's) leaves out its <code>sites/</code> folder, which holds every other site's uploads, and the plan says so. Any other site's <code>sites/</code> folder, a single site's included, still travels.</li>\n</ul>\n<p><strong>0.5.1</strong></p>\n<ul>\n<li>Breaking: <code>export all</code> needs its <code><zip></code>, <code>export users</code> its <code><file></code> and <code>import users</code> its <code>--map-file</code>; none has a default in the working directory any more, and an empty path is refused.</li>\n<li>Breaking: <code>--new-url</code> and <code>--old-url</code> must start with <code>http://</code> or <code>https://</code> and a valid host, and may not hold <code>%</code>. A URL change whose new address is the old one plus a path is refused unless you pass <code>--dangerously-allow-nested-url</code>.</li>\n<li>Breaking: every file that carries user data (the package, the users file, a dump, the id map, the backup) is refused in a directory another user could replace it in. A missing directory for one is created owner-only.</li>\n<li>Breaking: an import over an existing site takes the source's role definitions for every role the source defines, exactly as exported, and keeps the roles only the site defines; <code>--role-definitions=destination</code> keeps the site's definitions, as before. The plan, the closing lines and the JSON <code>run</code> record (<code>role_definitions</code>) list, per role, the capabilities added and removed.</li>\n<li>Breaking: <code>import all</code> refuses a package upload already on the site with other content, naming it, unless you pass <code>--upload-collisions=keep</code> or <code>--upload-collisions=replace</code>. One with the same content is skipped. <code>replace</code> moves the site's file into <code>--backup-dir</code> first, which it needs; the undo lines put it back. The plan and the JSON <code>run</code> record (<code>upload_collisions</code>) count them.</li>\n<li>Breaking: <code>import all</code> with <code>--plugins</code> or <code>--themes</code> refuses a plugin or theme installed at another version than the package's copy, older or newer, naming both versions, unless you pass <code>--installed-versions=keep</code> or <code>--installed-versions=replace</code>. <code>replace</code> moves the installed copy into <code>--backup-dir</code> first, before anything else runs; the undo lines put it back and say to reset PHP's opcode cache. Replacing code another site of the network runs needs <code>--dangerously-allow-shared-code-replace</code>, and the refusal names those sites. The plan and the JSON <code>run</code> record (<code>installed_versions</code>) list each difference. After a replace, a live run says to reset PHP's opcode cache, in its closing lines or, under <code>--format=json</code>, as the <code>run</code> record's <code>reset_opcode_cache</code>.</li>\n<li>The plugin and theme moves come before the site is created, the backup, the import and the URL passes, so no search-replace child loads the code being replaced. A move no longer predicts a rename from device numbers: two mounts of one filesystem failed it after the import. It renames a probe file first, once per move, and copies, verified, where the probe did not keep its inode. Copies keep their modification times.</li>\n<li>Nested mounts are not supported: read from <code>/proc/self/mountinfo</code>, a mount point inside the uploads, plugin or theme tree a move places files in, or in installed code <code>--installed-versions=replace</code> would move away (a single-file plugin mounted on its own included), refuses the run while the plan is built, naming the mount point, and agLine truncated
|
||||
"changelog": "<p><strong>0.6.0</strong></p>\n<ul>\n<li>Breaking: every package must be re-exported. <code>users.json</code> is format 3, and a format 2 file is refused. The users row carries <code>spam</code> and <code>deleted</code> (a network's account flags) beside <code>user_status</code>, each held to an integer in its column's range.</li>\n<li>Breaking: an account flagged spam or deleted on the source network is created flagged on a network, and refused by name on a single site, which cannot record the flags. A new user keeps its <code>user_status</code>.</li>\n<li>Breaking: a plugin whose header says <code>Network: true</code> is planned as WordPress activates it, network-wide, and needs <code>--allow-main-site</code>. Into a single site, a plugin the source ran network-active is activated on the site and stays active.</li>\n<li>Breaking: an <code>import all --plugins</code> whose dump's <code>active_plugins</code> row cannot be read while the plan is built is refused. A plugin the source ran network-active is activated before the search-replace children, so they no longer rewrite its serialized objects as empty ones; the plan notes that its activation hook runs while the site still has the old address.</li>\n<li>Breaking: on a single site, a matched user who holds no role there is given the exported role(s), as a network already did. That writes to the main site, so it needs <code>--allow-main-site</code>.</li>\n<li>Breaking: an import into an existing site whose <code><prefix>options</code> table the table discovery does not find is refused, naming the prefix and the server's <code>lower_case_table_names</code>.</li>\n<li>Breaking: <code>--uid-columns=links.link_owner</code> is refused. <code>links.link_owner</code> and <code>_edit_last</code> are now remapped by default.</li>\n<li>Fixed: under a <code>sql_mode</code> holding <code>NO_BACKSLASH_ESCAPES</code>, an import into an existing site found none of its tables on MySQL, so it took no backup and asked no <code>--dangerously-allow-drop-tables</code>. The listing now escapes with <code>LIKE … ESCAPE '|'</code>. The dump import also ran under that mode and read the dump as no dump tool writes it, which let a crafted row run a <code>DROP TABLE</code>; it now runs without <code>NO_BACKSLASH_ESCAPES</code> and <code>ANSI_QUOTES</code>.</li>\n<li>Fixed: <code>users update_passwords --role</code> selected nobody for a role holding an <code>_</code> (<code>shop_manager</code>) on MySQL under that mode. The URL leftover count is the same in any <code>sql_mode</code> and counts only what the passes left.</li>\n<li>Fixed: no object is made from a stored value; role definitions and <code>active_plugins</code> are read with <code>allowed_classes</code> false. A serialized value whose length runs past its end no longer stops the plan with a TypeError.</li>\n<li>A plugin already network-active is a <code>noop</code> into a site the run creates. An activation is judged against the site as the import leaves it, read from the dump's own <code>active_plugins</code> row.</li>\n<li>The plan notes each new user whose nicename WordPress will number because another account holds it. A run that runs a search-replace child says which WP-CLI it runs under and notes when that WP-CLI's search-replace keeps only stdClass objects. What a child reports it skipped is reported in the closing lines and the JSON <code>run</code> record (<code>search_replace_warnings</code>), never as a failure.</li>\n</ul>\n<p><strong>0.5.2</strong></p>\n<ul>\n<li>Breaking: a single site's tables named the prefix, a number and an underscore (<code>wp_404_to_301</code>, <code>wp_2024_archive</code>) are exported like its others; they were left out without a word, and refused when named. Those whose number's tables include a core or network table name (<code>wp_2_posts</code>, <code>wp_2_users</code>) are another site's or install's: left out, and named in the plan.</li>\n<li>On a network, blog 1 still leaves such tables out by default, and the plan now names each with its reason: a registered site's (counted per site), another site's or install's, or one that may be the site's own.</li>\n<li>Breaking: <code>--tables</code> and <code>--non-default-tables</code> may name any of them but a registered site's (a single site has none), and the plan says it was included by name; naming a registered site's table is refused in new words. <code>posts update_author --uid-columns</code> on such a table says so too. An import into blog 1 or a single site refuses such a table unless <code>--tables</code> names it, and the plan names every one a dump brings.</li>\n<li>Breaking: <code>export all --uploads</code> from the uploads root as WordPress computes it for the network the command runs on (the main network's main site's) leaves out its <code>sites/</code> folder, which holds every other site's uploads, and the plan says so. Any other site's <code>sites/</code> folder, a single site's included, sLine truncated
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user