Skip to content

[06], plugin 10: Subset Sync

Move a WordPress site without exporting SQL by hand

Push and pull databases and media between your sites.

Moving a site between staging and production shouldn't mean exporting SQL and running find and replace by hand. Subset Sync pushes and pulls the database and media between WordPress sites, backs up first, and rewrites URLs without breaking serialized data.

To install and update the free plugins from wp-admin, add the Subset Installer.

DocumentationChangelogCompare with WP MigrateCompare with WP SynchroCompare with All-in-One WP Migration

Requires
WP 6.0+ · PHP 8.1+
Tested to
WP 7.1
WP-CLI
Yes
REST
Yes
Multisite
Yes
Editions
Free + Pro

How Subset Sync works

Subset Sync builds the incoming tables next to your live ones, then swaps them in at the end with a single RENAME TABLE. Your site never sees a half-migrated database. Cancelling before the swap drops the copies and leaves the database as it was.

Site URLs, http and https, and file paths are rewritten everywhere, including inside serialized and JSON data. Serialized values are never unserialized: a small tokeniser changes only the string contents and recomputes their byte lengths, so objects of classes that aren't loaded come through intact.

Jobs run in steps of about 20 seconds that save their place after every chunk, so a big site isn't limited by PHP timeouts or request size limits. If the browser closes or a request fails, Resume carries on from the last chunk.

Before a push, pull or import replaces a database, that database is backed up, and the newest three backups are kept. Every push and pull shows a preview first, with the tables and row counts, the media files and sample rewrites. A site marked as production asks you to type its domain before anything overwrites it.

What each version includes

Pro is a separate add-on that installs alongside the free plugin. Everything in the free list stays free.

Free

Full plugin

No time limit and no upgrade nags.

  1. Push, pull, export and import
  2. Database, media library, or both
  3. Serialization-safe find and replace
  4. Dry run preview before every migration
  5. Automatic backups with one-click restore
  6. Multisite networks and single subsites
  7. Resumable jobs, history and email alerts
  8. Full WP-CLI support

Pro

Add-on

Everything in Free, plus:

  1. Push and pull themes and plugins
  2. Scheduled database backups
  3. Convert a network between subdomains and subdirectories
  4. Pro settings that survive a migration

How it compares

Each comparison checks Subset Sync against another plugin row by row, with a source for every claim about the other plugin. See every comparison

  • Subset Sync vs WP Migrate

    Checked

    Pick Subset Sync if you want push, pull, media and WP-CLI in the free plugin, with a preview and a backup before every replace. Pick WP Migrate if you need to move a subsite from one multisite network to another, leave out whole post types, or export a full site as a ZIP that Local can import.

  • Subset Sync vs WP Synchro

    Checked

    Pick Subset Sync if you want media, WP-CLI and multisite in the free plugin. Pick WP Synchro if you want saved migrations to run on a schedule, or need to move custom files and folders beyond themes and plugins.

  • Pick Subset Sync if you move a database and media between live sites often, and want push, pull, WP-CLI and multisite in the free plugin, with a backup before every replace. Pick All-in-One WP Migration if you're moving a whole site, themes and plugins included, as one file you can carry to a new host, or your server runs PHP older than 8.1.

Questions

Does it move themes and plugins?
Not in the free plugin, which moves the database and the media library. Subset Sync Pro pushes and pulls themes and plugins, and swaps them in only when every one has arrived.
What stays on the destination after a pull?
Its connection settings and saved connections, home, siteurl, upload_path, upload_url_path and blog_public, and Subset Sync's own activation. The rest of the database is replaced, including the users table.
Why am I signed out after a pull or import?
A pull or import replaces the users table. You're signed back in as the user with the same username in the new data. If there isn't one, you're signed out and need to log in with an account from the source site.
What happens if a migration is interrupted?
The job saves its place after every chunk. Click Resume on the Migrate tab or run wp subset sync resume, and it carries on without applying a chunk twice.
Should I skip the backup on a large site?
Maybe. On a large database the backup can take about as long as the migration, and the preview shows its estimated size first. Skip it only if you have a recent backup from your host or an export.
Does it work with multisite?
Yes. A network migrates as a whole, to or from another network of the same type, and you can move one subsite to or from a single site. Converting between subdomain and subdirectory networks needs Pro.
What happens to my backups if I delete the plugin?
Deleting Subset Sync, rather than deactivating it, removes its settings, keys and every backup. Download any backup you want to keep first.
Can I run it from the command line?
Yes. Everything the admin screen does can be done with WP-CLI under wp subset sync, including push, pull, export, import, resume and restore.

Underneath

Every Subset plugin has WP-CLI commands and documented hooks and filters. It also has a REST API.

Read the developer reference

Every Subset Sync WP-CLI command

WP-CLI
$ wp subset sync diff <remote|name> [<key>]
$ wp subset sync pull <remote|name> [<key>] --dry-run
$ wp subset sync backups

Hear about Subset Sync releases

We’ll email you when Subset Sync has a new release, and only about Subset Sync.

One confirmation email, then nothing until we have news. Unsubscribing takes one click and no account.

We will email you a confirmation link. Click it and you are on the list. Until then nothing is confirmed.