Skip to content

[00] Subset Clone, User guide

Copy to a connected site

Use Subset Clone Pro to copy a post from one WordPress install to another, such as staging to live, over a saved Subset Sync connection.

Subset Clone Pro can copy a post to a separate WordPress install, such as from staging to your live site, through a connection saved in Subset Sync. The copy arrives as a new draft with its custom fields, terms and media. Nothing on the other site is overwritten unless you choose to update a copy you sent it earlier. This page covers setting up both sites, sending a copy, updating an earlier copy, what comes across and the limits.

It works on single sites and on networks. To copy between sites of one multisite network, use Copy to another site instead.

What both sites need

Install these on the site you copy from and on the site you copy to:

  • Subset Clone and Subset Clone Pro 0.3.0 or later
  • Subset Sync 0.23.0 or later

To update an earlier copy, or to copy from the block editor, you need Subset Clone Pro 0.4.0 or later. Updating needs 0.4.0 on both sites.

The site you copy from needs a saved Subset Sync connection to the other site. Connect the sites in the Subset Sync docs covers saving one. A site behind a username and password (HTTP Basic Auth) works when the login is in the connection’s URL, as described in Password-protected sites.

Let the other site accept copies

The site you copy to decides whether it takes copies. Both settings are off by default.

  1. On that site, open Subset → Migration → Connection.
  2. Under Other sites can, tick Push to this site.
  3. Under Copies from Subset Clone, tick Accept copies from other sites.
  4. Click Save changes.

Copies can’t arrive while either setting is off. To fix the setting in wp-config.php, define SUBSET_DUP_PRO_ACCEPT_REMOTE_COPIES as true or false. The checkbox is then locked. From WP-CLI, run:

wp subset duplicator remote settings set accept_copies on

Copy a post

From a posts or pages list:

  1. Hover over the post and click Copy to connected site…. To copy several, tick them and choose Copy to connected site… from the bulk actions.
  2. Under Connected site to copy to, pick the connection.
  3. Click Copy.

You’ll see a notice with a link to edit each copy. Any post that couldn’t be copied is listed with the reason.

From the block editor:

  1. Open the Options menu (the three dots at the top right) and choose Copy to connected site….
  2. Under Copy to, pick the connection. If that site has an earlier copy of the post, you can choose to update it.
  3. Click Copy. If the post has unsaved changes, the button says Save and copy, and your changes are saved first.

A notice links to the copy on the other site.

From WP-CLI, add --to-connection with the connection’s name:

wp subset duplicator duplicate 42 --user=admin --to-connection=Live

Update an earlier copy

When the other site already has a copy it made from this post, you can update that copy instead of making a new draft. Once you pick a connection, the screen asks that site for earlier copies. Update the earlier copy instead of making a new draft appears only when there’s one your account there can edit. If the site has a copy your account can’t edit, the screen says so and copying makes a new draft. With several posts chosen, the screen says how many have a copy you can update, and the rest are copied as new drafts.

From WP-CLI, add --replace:

wp subset duplicator duplicate 42 --user=admin --to-connection=Live --replace

An updated copy:

  • Keeps its status, slug, author, date and parent. A published copy stays published, so the change shows on the live site straight away.
  • Saves its previous version as a revision on the other site first. To undo the update, restore that revision there.
  • Gets the new content, custom fields, terms and media in the same way as a new copy. Custom fields the original no longer has stay on the copy, except the page template and featured image, which follow the original.

Only a copy that the other site made from this post counts. If there are several, the newest is updated. A post there that was duplicated from a copy isn’t updated. When there’s no earlier copy, you get a new draft as usual.

The update is refused, and nothing changes, when:

  • someone has the copy open in the editor on the other site;
  • your account there can’t edit the copy;
  • the other site doesn’t keep revisions for that type of post;
  • the copy is a different post type from the original now.

Both sites need Subset Clone Pro 0.4.0 or later. Copies made with 0.3.0 can’t be updated, so the first copy of a post sent with 0.4.0 is a new draft.

What comes across

A new copy is a draft on the other site. It gets the same content and custom fields as a copy to another site in a network:

  • Terms, matched by slug, with a child term matched through its parents. A term the other site doesn’t have is created there by default.
  • Media. The featured image and the media the content uses are sent with the post and added to the other site’s uploads, and the content is updated to point at them. Copy the same post again and media the other site already has from an earlier copy isn’t sent again.
  • Author. The copy belongs to the account on the other site with your email address. If there’s none, an account with your username is used. If neither exists, the copy fails.

The originals don’t change, and no existing post on the other site is overwritten unless you choose to update an earlier copy.

Who can copy

To send a copy, you need to be allowed to duplicate the post on this site and to use Subset Sync, which means being an administrator, or a super admin on a network.

On the other site, the account the copy belongs to must be able to create that type of post, under that site’s own Subset Clone settings. The other site filters the copy like any new post from someone without the unfiltered_html capability, and each media file must be a type that account may upload.

How big a copy can be

A post and its media travel in one request, so the whole copy has to fit in what the other site’s web server accepts: its PHP post_max_size, up to 32 MB. A larger copy is refused with a message giving both sizes. Raise post_max_size on that site, or copy the post without some of its media. A developer can change the limit with the subset_dup_pro_remote_max_package filter, described in the developer reference.