26 lines
31 KiB
JSON
26 lines
31 KiB
JSON
{
|
|
"name": "MU Migration",
|
|
"slug": "mu-migration",
|
|
"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-06 19:50:32",
|
|
"author": "Mike Mulligan",
|
|
"author_homepage": "https://gitea.mulligan.casa/mmulligan",
|
|
"tags": [
|
|
"multisite",
|
|
"migration",
|
|
"wp-cli",
|
|
"export",
|
|
"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, 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> 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 recovery guidance.</li>\n</ul>\n<p><strong>Acknowledgement flags</strong></p>\n<ul>\n<li><code>--allow-main-site</code>: any write to the network's main site (or the only site of a single-site install), and every network-wide plugin activation.</li>\n<li><code>--dangerously-allow-drop-tables</code>: a dump that drops a table that exists now.</li>\n<li><code>--dangerously-allow-table-changes</code>: a dump that changes an existing table in place (REPLACE, ALTER, or INSERT without recreating it).</li>\n<li><code>--dangerously-allow-global-tables</code>: widening the search-replaces to the network's users, usermeta, blogs, site and sitemeta tables.</li>\n<li><code>--allow-overwrite</code>: writing an output file over an existing one.</li>\n<li><code>--dangerously-allow-role-overwrite</code>: replacing the role of an existing user who already has one on the target site.</li>\n<li><code>--allow-password-reset-mail</code>: mailing password-reset links, the tool's only outbound network call.</li>\n<li><code>--dangerously-allow-nested-url</code>: a URL change whose new address is the old one plus a path (<code>https://net.test</code> to <code>https://net.test/site3</code>), which also rewrites every other address under the old one, links to sibling sites included.</li>\n<li><code>--dangerously-allow-shared-code-replace</code>: <code>--installed-versions=replace</code> of a plugin or theme another site of the network runs (active there, network-active, or the parent of its theme). The new code runs on those sites too, and the run's undo cannot put them back; the refusal names them.</li>\n</ul>\n<p>Two more flags request behaviour that is off by default, and the confirmation lists them: <code>--dangerously-allow-guid-rewrite</code> (search-replaces otherwise always skip the <code>guid</code> column) and <code>--dangerously-allow-database-redirects</code> (dumps with <code>USE</code>, database-qualified names or a <code>REFERENCES</code> into another database are otherwise refused; allowing them prints a DANGER warning even under <code>--quiet</code>, because such statements can write outside the backed-up database).</p>\n<p>Every flag is bare: a value or a <code>--no-</code> negation is refused. Former spellings, such as <code>--blog_id</code> or <code>--allow-drop-tables</code>, are refused with the name that replaced them.</p>\n<p><strong>Safety behaviour</strong></p>\n<ul>\n<li>Tables are discovered by prefix against the live database; network tables and other sites' tables are never exported or imported, and the network tables are search-replaced only when you request it.</li>\n<li>The prefix rewrite is done in PHP on a copy of the dump, followed by a scan for any surviving old-prefix identifier. Views, triggers and unrecognised statements are refused.</li>\n<li>Before an import, the target site's existing own tables are backed up to <code><backup-dir>/mu-migration-backup-blog<id>-<timestamp>.sql</code>, an owner-only (0600) file in an owner-only (0700) directory. <code>--backup-dir</code> must be absolute and outside the WordPress root. This backup does not cover network tables, users and memberships, uploads, plugin and theme directories or redirected databases: take a full backup first.</li>\n<li>The dump is fed to <code>wp db import -</code> on standard input, where the database client stops at the first statement that fails. The import fails, naming the error and its line, when the client exits non-zero or prints an <code>ERROR</code> line. <code>wp db import <file></code> carries on past a failed statement and exits 0.</li>\n<li>After the import, every expected table must exist, and each table the dump drops or creates must hold at least the rows the dump inserts into it. A table the dump creates with <code>IF NOT EXISTS</code> and never drops, and a table it writes with <code>INSERT DELAYED</code> (whose rows the server queues), are named in the plan as not counted.</li>\n<li>After a live run, the closing lines and the JSON <code>run</code> record name the WP-CLI the search-replace children ran under and, per child, what it skipped (a serialized object of a class it had not loaded, which keeps its old URLs or loses its data).</li>\n<li>Search-replaces run over an explicit table list with <code>--skip-columns=guid</code>. The URL is matched only as a whole host and path, the host in any case. <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>. The new URL's scheme is written into every <code>http://</code> and <code>https://</code> reference, plain, JSON-escaped or URL-encoded. Each reference is moved in its own form, the whole address (host, port and path) written in it; protocol-relative and bare references keep their form. An e-mail address at the old host is never rewritten, and a bare single-label host such as <code>localhost</code> is left alone. The uploads path moves in every form, and only in the site's own references. A read-only scan afterwards reports, per column, the values that still hold the old host.</li>\n<li>Every file that carries user data (the package, the users file, a dump, the id map, the backup) is owner-only (0600) from its first byte and refused in a directory another user could replace it in. The package is built in a private directory beside its destination, and a move writes nothing through a symbolic link.</li>\n<li>Text from a package (entry names, <code>meta.json</code> values, dump names, logins) is printed with its control characters as escapes.</li>\n<li>Users travel in <code>users.json</code> (format 3), which carries every role a user holds on the exported site, every usermeta row that travels, byte for byte, and from a network each account's <code>spam</code> and <code>deleted</code> flags. Session tokens and application passwords never travel; the per-site keys WordPress itself writes are moved to the target site's prefix, and every other key keeps its name. A users file of format 2 (0.5.x) or a <code>users.csv</code> from a version before 0.5.0 is refused: re-export it. A new user's <code>user_status</code>, and on a network its flags, are written with its password hash, so an account flagged on the source network arrives flagged; on a single site, which cannot record the flags, an account the import would create flagged is refused by name. When another account holds a new user's nicename, the plan says which numbered nicename WordPress will store and that their author archive moves.</li>\n<li>A new user's meta rows are written directly, in one transaction per user, so no <code>added_user_meta</code> or <code>updated_user_meta</code> hook fires for them; the plugin's own user-data hooks still run. A value the database column cannot hold stops the run, naming the user, the key and the row; on a usermeta table that keeps no transactions (MyISAM), it also names the rows already written.</li>\n<li>Existing users are matched by login or email and keep their account, password, meta, flags and existing role on the target site; one with no role there is given the exported role(s), on a network or a single site. A user matching more than one account is refused. The imported role definitions are renamed to the target site's own option name directly after the import, before the search-replaces load the site's theme and plugins; if something wrote that option in between, the two are merged (the imported definition wins for each role it defines) and the run names the roles the existing option added. The role definitions travel with the site: the imported ones are then merged with the target site's own, the source's definition standing for every role it defines and a role only the site defines kept. <code>--role-definitions=destination</code> keeps the site's own definitions instead. The plan, the closing lines and the JSON <code>run</code> record (<code>role_definitions</code>) list, per role, the capabilities the merge adds and removes.</li>\n<li>Plugins and themes are installed only with <code>--plugins</code> and <code>--themes</code>. A plugin is activated as WordPress activates it: on a network, one whose header says <code>Network: true</code> is activated network-wide, so it needs <code>--allow-main-site</code>; on a single site every activation is the site's own. A plugin the source ran network-active is activated before the URL passes, so their children load it and keep its serialized objects; its activation hook then runs while the site still has the address the dump brought, so what it writes outside the passes' tables keeps that address, and the plan says so. One already active once the dump has run is left alone. One already installed is compared with the package's copy by its <code>Version</code> header: the same version is left alone, and another, or one that cannot be read, refuses the import, naming both versions, unless <code>--installed-versions=keep</code> keeps the installed code or <code>--installed-versions=replace</code> moves it into <code>--backup-dir</code> and installs the package's. Plugin and theme code is shared by every site of a network: replacing code another site runs needs <code>--dangerously-allow-shared-code-replace</code>. The plugin and theme moves come first, before the site is created, the backup, the import and the URL passes. Uploads are merged: a file already there with the same content is skipped, and one with other content refuses the import unless <code>--upload-collisions=keep</code> keeps it or <code>--upload-collisions=replace</code> moves it into <code>--backup-dir</code> and places the package's. The undo and recovery lines put a replaced plugin, theme or upload back, remove the directories the run made for them in the backup directory, and say to reset PHP's opcode cache after a plugin or theme. A move renames only where a rename really moves the file, and otherwise copies it, keeping its mode and modification time. Uploads, plugins and themes get the modes WordPress gives them, whatever the umask.</li>\n<li><code>--format=json</code> prints JSON Lines: a <code>step</code> record per step, a <code>summary</code>, a <code>refused</code> record when an acknowledgement is missing, and a final <code>run</code> record with the outcome, the backup path, the files written, the remap tallies, the upload collisions, the installed versions, the URL leftovers and the recovery or undo lines. A <code>step</code> record is printed before anything is applied, so its <code>performed</code> is true only for what the plan build itself did; the live outcome is the <code>run</code> record.</li>\n</ul>\n<p>A run that completed prints, last, the commands that undo it: the same lines a failure would print. Recovery after a failure is printed guidance, never executed. Its restore of the backup is <code>wp db import - < '<backup>'</code>, 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.</p>",
|
|
"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.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, 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 again just before the move. A destination that is itself a mount point is fine. Where the mount table cannot be read, the plan and the run's closing lines say nested mounts were not checked, and the run goes on.</li>\n<li>Imported uploads, plugins and themes get the modes WordPress gives them, whatever the umask: an upload its directory's mode less the execute bits, a plugin or theme <code>FS_CHMOD_FILE</code> and <code>FS_CHMOD_DIR</code>.</li>\n<li>A run that completed prints the commands that undo it (\"To undo this run:\"), the backup restore and the drop of the tables it created included; the JSON <code>run</code> record carries them as <code>undo</code>.</li>\n<li>The URL change writes the new scheme, moves every plain, JSON-escaped and URL-encoded reference whole, matches the host in any case, and never rewrites an e-mail address. A bare <code>localhost</code> is left alone. The uploads path moves in every form, and only in the site's own references.</li>\n<li>A read-only scan after the URL change reports what still holds the old host, in the closing lines and the JSON <code>run</code> record (<code>url_leftovers</code>).</li>\n<li><code>--uid-columns</code> remaps plugin table columns of user ids. Comment authors are remapped by default, <code>_customer_user</code> wherever the key exists, and a user id of 0 means no user. Each remap is one statement per target, compares values exactly and refuses a column too narrow for the new ids; a bad id map is refused before anything runs.</li>\n<li>Every file that carries user data is owner-only from its first byte, the package is built in a private directory, the dump file is created before the dump client opens it, and a move writes nothing through a symbolic link.</li>\n<li>Package zip entries that could reach outside the extraction directory are refused, and text from a package is printed with its control characters as escapes.</li>\n<li>A refusal no longer runs on into the sentence printed after it. A live run names each file it wrote by its resolved path, the backup included. A constraint name carrying the table prefix after an underscore is now renamed. The full list is in the repository's CHANGELOG.md.</li>\n</ul>\n<p><strong>0.5.0</strong></p>\n<ul>\n<li>Breaking: users travel in <code>users.json</code> (format 2) instead of <code>users.csv</code>. A <code>users.csv</code>, or a package from before 0.5.0, is refused: re-export it with this version.</li>\n<li>Breaking: the <code>mu_migration/export/user/headers</code> filter is removed; what the <code>mu_migration/export/user/data</code> filter returns travels without it.</li>\n<li>Breaking: every option has one hyphenated spelling (<code>--blog-id</code>, <code>--new-url</code>, <code>--old-url</code> …); the underscore forms 0.4.0 took are refused, naming the new one. Flags take no value and cannot be negated.</li>\n<li>Breaking: <code>import tables</code> and <code>import users</code> require <code>--blog-id</code>; <code>import all</code> requires <code>--new-url</code> or <code>--same-url</code>; <code>import tables</code> requires <code>--old-url</code> with <code>--new-url</code>, or <code>--same-url</code>. Without <code>--blog-id</code>, the exports read the site WP-CLI runs against, not blog 1.</li>\n<li>Breaking: a live run that changes anything asks for confirmation (<code>--yes</code> skips it) and is refused when nobody could answer, and each dangerous effect needs its own acknowledgement flag (<code>--allow-main-site</code>, <code>--dangerously-allow-drop-tables</code> and the others listed above).</li>\n<li>Every run is planned first and the plan printed; <code>--dry-run</code> stops there. <code>--format=json</code> prints the plan and outcome as JSON Lines.</li>\n<li>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.</li>\n<li>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.</li>\n<li>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 <code>--dangerously-allow-role-overwrite</code>.</li>\n<li>Plugins and themes are installed only with <code>--plugins</code> and <code>--themes</code>, never over an installed copy; uploads are merged without replacing files.</li>\n<li>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.</li>\n</ul>\n<p><strong>0.4.0</strong></p>\n<ul>\n<li>Forked from 10up/MU-Migration at its final commit. Packaged as a WordPress plugin with self-hosted updates.</li>\n<li>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.</li>\n<li>Fixed site creation reporting id 0 for every new site.</li>\n<li>PHP floor raised from 7.1 to 8.1. Runtime Composer dependencies removed.</li>\n<li>Dead code and the retired Travis configuration removed.</li>\n</ul>"
|
|
}
|
|
}
|