| 开发者 | motylanogha |
|---|---|
| 更新时间 | 2026年12月3日 14:55 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-content into a single file you can download, keep as a backup, and restore, on the same site or on a brand-new install somewhere else. When you restore onto a different address, Migrator rewrites the old URLs and file paths to the new ones for you, so the site just works.
Everything happens on your own server. There is no account to create and no file size sold back to you, and nothing leaves your server unless you add an off-site destination you own or switch on Pull and Push.
How it works
wp-content into one archive next to it.wp migrator pull https://your-old-site.example: the first run prints a key, which you paste on the source's Pull and Push screen, then you run the same command again (a source without the OpenSSL extension takes a connection token instead). The files and the database travel in small pieces, an interrupted pull carries on where it stopped when you run it again, and the next run fetches only what changed. Addresses are rewritten while the database streams in, the database keeps its exact bytes so accented text survives, and the old host's own platform plugins and server-bound drop-ins are left behind. wp migrator push sends the destination's file changes back.
A few things worth knowing
Backups are written to wp-content/migrator-backups. On Apache and IIS that folder denies direct web access. nginx ignores those rules, so every backup file name also carries a random token and is never at a guessable URL. The in-browser download is served only to logged-in administrators through an authenticated handler. Each item inside an archive carries a checksum, and a finished archive ends with an end marker, so a truncated or corrupted backup is caught before it is restored over a live site.
Restoring overwrites the parts you choose (the database, plugins, themes, uploads, other wp-content files), that is the point of a restore. Untick the database to roll back a plugin or theme without losing the orders and posts made since the backup, or restore only the database and leave the files alone. A restore asks for confirmation and is limited to administrators. Migrator never overwrites its own plugin folder during a restore, so it cannot pull the rug out from under itself mid-import.
For large sites where a browser request would time out, every job also runs from WP-CLI, which has no timeout:
wp migrator export
wp migrator import path/to/backup.migrator
What's included
wp-content into a single archive*.log, *.zip) and files over a size you choose, in the browser, on a schedule and with wp migrator export --exclude-pattern --max-file-sizewp migrator import --onlywp migrator pull: resumable, and the next run fetches only the changeswp migrator push, and run the low-level transfer commands through wp migrator remoteexport, import and replace commands for sites too large for the browserwp migrator replace command, to change a domain, URL or path safely/wp-content/plugins/plogins-migrator, or install it from Plugins > Add New.wp migrator export from the command line.Yes for the parts you restore. A restore replaces the destination's database and files with the contents of the archive, that is what restoring a backup means. Untick a part (the database, plugins, themes, uploads or other files) to keep this site's copy of it. It is limited to administrators and asks for confirmation first. Always keep a separate backup of anything on the destination you want to keep.
No. When you restore onto a different address, Migrator rewrites the old site URL and file paths to the new ones, including inside serialized data, so internal links and settings keep working.
Migrator sets no size limit. A browser export runs in short steps, so PHP time limits do not stop it, and uploads go in 4 MB pieces, so your host's upload limit does not apply. A browser restore runs as one long request, and some hosts or proxies (Cloudflare, nginx) cut those off. For a big site, restore with wp migrator import <file>, which has no time limit.
The restore may still be running on the server. Wait a few minutes, then check the site. To avoid it, restore over WP-CLI. If a restore stops after the database was replaced, the error message gives the path of the database dump taken before the restore, so you can put the old database back.
The archive is checked before the database is touched, so an unfinished or corrupt archive is refused with the site left as it was. If the database import or the URL rewrite fails, the previous database is restored automatically. If a later step fails (for example, the disk fills while files are extracted), the site is left part restored, and the message says what state it is in and where the previous database dump is, so you can restore it by hand.
No. Download the installer from Migrator > Deploy, upload installer.php and a backup to the empty folder, and open installer.php in the browser with the access key shown on the Deploy screen. You can also install WordPress and Migrator there first and restore the archive; a different table prefix is renamed to the new site's prefix during the restore.
No. An archive holds the database and everything in wp-content. WordPress core comes from the fresh install, and wp-config.php stays the destination's own, so its database credentials are never overwritten.
Not yet. Restore it with the plugin that made it, then create a Migrator backup to use from then on.
It is Migrator's own streaming format, not a ZIP. For a copy that opens anywhere, use Download .tar.gz in the backups list: the same database dump and wp-content files as a standard archive that tar -xzf, 7-Zip or your computer's archive tool opens without Migrator. To restore with Migrator, use the .migrator file.
Only where you tell it to. Migrator creates no account and calls no service of ours. Backups stay in wp-content/migrator-backups unless you add an off-site destination (an FTP or FTPS server, or a folder outside the web root), and then a copy goes there. Scheduled backups older than your retention setting are deleted automatically.
If you switch on Pull and Push, a site holding your connection token or an enrolled key can download this site's files and database, user password hashes included. It is off by default, nothing is answered without that credential, and you can switch it off again when the move is done.
Install Migrator on both sites. On the old one, switch on Migrator > Pull and Push. On the new one, run wp migrator pull https://old-site.example with WP-CLI. The first run prints a key: paste it on the old site's Pull and Push screen and run the command again. A server without the OpenSSL extension cannot check keys, so there you set a connection token and add --secret=<token>. The new site keeps its own WordPress core, wp-config.php and table prefix (on a single site, a source with another prefix has its tables and prefixed user keys moved to this site's prefix; a multisite needs matching prefixes), its database is dumped before it is replaced and put back if the import fails, and Migrator's own folder is never overwritten. Running the same command again fetches only what changed.
To bring over only new uploads, for example at the switch-over after plugins and themes were updated on the new site, run wp migrator pull https://old-site.example --skip-database --only=uploads. --only takes any of uploads, plugins, themes, mu-plugins and languages, comma separated, and --exclude=uploads/cache leaves a path out. Files outside the chosen folders are neither overwritten nor removed.
Files, yes: wp migrator push https://old-site.example sends what changed since the pull. The old site must grant push access to your key on its Pull and Push screen, and its server needs a writable folder beside the web root on the same disk, where the upload is staged before it is swapped in. The database is pushed only to hosts that serve the transfer API on a standalone route; wp migrator remote db-push --help explains it. While a push applies its changes the old site shows a maintenance page; if the push stops part way, run it again to finish.
In wp-content/migrator-backups. On Apache and IIS the folder denies direct web access; on nginx, which ignores those rules, each file name carries a random token so it cannot be guessed. Removing the plugin deletes that folder and its contents. Copies on an off-site destination stay there.
Yes. Orders (including HPOS tables), products and settings move with the database. You can leave out WooCommerce sessions and Action Scheduler tables to make the archive smaller.
It runs on Multisite: network activate it or activate it on individual sites, and each site keeps its own settings and data. Restoring a network is a different matter. The free edition refuses an import when either the archive or the target site is a network, so network migration needs the Migrator Pro add-on.
Comparing free editions:
wp migrator export, import and replace are in the free plugin.wp migrator pull works into a single site with another table prefix. The pulled database goes through the same importer as a restore: tables and the prefixed user keys move to this site's prefix, then the old addresses are rewritten. A multisite still needs matching prefixes.wp migrator import --admin-user=<login> with the password from a prompt or the MIGRATOR_ADMIN_PASSWORD variable).migrator/default_excludes to bring them back).wp migrator pull takes --only (uploads, plugins, themes, mu-plugins, languages) and --exclude (paths under wp-content). With --skip-database --only=uploads only new uploads come over, and plugins and themes updated on this site keep their versions.wp-content) that opens with tar, 7-Zip or a desktop archive tool, no Migrator needed.wp-content files, for an uploaded archive and for a backup stored on the site. A files-only restore leaves the database untouched. On the command line: wp migrator import <file> --only=plugins,themes.*.log, *.zip) and files larger than a size you set, on the export screen, in scheduled backups and in wp migrator export (--exclude-pattern, --max-file-size).migrator_step_seconds filter sets how long one export step may work, for hosts whose proxy cuts requests short.wp migrator pull, PRO adds the wp-admin screen.wp migrator pull, resume an interrupted pull, fetch only the changes on the next run, and send file changes back with wp migrator push. Off until you switch it on.wp migrator remote runs the low-level transfer commands, such as keygen, files-stats or db-push.% characters in the database. In 1.3.8, permalink structures, text such as "50%" and serialized values containing % were damaged on restore.wp migrator import reports errors cleanly.migrator/backup_destinations filter instead of the free plugin knowing about them.wp migrator replace) to change a domain, URL or path without corrupting serialized data.wp-content.export and import for sites too large for the browser.