Skip to content

[00] Subset Clone, Guide

How to copy a page to another site in WordPress multisite

Why WordPress multisite has no way to copy a post or page between sites, how to do it with Export and Import, and what breaks along the way.

Published
Fix uses
Subset Clone Pro
Reading time
4 min

Why there’s no copy button between sites

In a multisite network, every site keeps its content in its own database tables. Site 2’s posts live in wp_2_posts and its terms in wp_2_terms, while the main site uses wp_posts. The multisite documentation (opens in a new tab) puts it this way: “The content in a Multisite has its own unique tables in the database, only the user table is shared between the instances.”

A post refers to other records by ID, and those IDs only mean something on the site they came from:

  • Media. The featured image is stored as an attachment ID. Block markup carries IDs too, such as "id":57 on an image block and the wp-image-57 class. Attachment 57 on site 2 is a different file, or nothing.
  • Terms. Categories and tags are linked by term ID, and the same category has a different ID on each site.
  • Authors. Users are shared across the network, but a user isn’t a member of every site.

Copying the database row across would leave a post pointing at images and categories that don’t exist on the other site. WordPress core has no screen that copies a post and fixes those references for you.

Copy with Export and Import

WordPress’s own route is to export from one site and import into the other. It works for a handful of posts, and it doesn’t need any extra plugin on the source site.

  1. On the source site, go to Tools → Export, choose Posts or Pages, and narrow it with the category, author, date and status filters. Click Download Export File.
  2. On the target site, go to Tools → Import. Under WordPress, click Install Now if the importer isn’t installed, then Run Importer.
  3. Upload the file. Map each author to an existing user or create a new one.
  4. Tick Download and import file attachments so the media comes across, and run the import.

The steps are in WordPress’s importing content guide (opens in a new tab). The importer is the WordPress Importer (opens in a new tab) plugin.

What to check afterwards:

  • You can’t pick one post. The export filters work on category, author, date range and status. To move one page, narrow the filters until it’s the only match, or edit the file.
  • Some media is left out. In the current export code (opens in a new tab), a posts or pages export adds each post’s featured image and the media attached to it. An image uploaded to a different post and inserted into this one isn’t in the file.
  • Block image IDs aren’t updated. The importer (opens in a new tab) downloads each attachment from its old URL, then rewrites those URLs in the content and remaps the featured image. It doesn’t change the attachment IDs in block attributes or wp-image- classes, so the editor can lose track of which image a block uses.
  • Existing posts are skipped. If the target site already has a post of the same type with the same title and date, the importer reports that it “already exists” and doesn’t import it.
  • Terms are matched by slug. A category whose slug already exists on the target site is reused. One that doesn’t is created.

Copy with Subset Clone Pro

Subset Clone Pro adds Copy to site… to a multisite network. It works from the places you already duplicate posts:

  • the Copy to site… link under a post in the posts or pages list
  • the Copy to site… bulk action, for several posts at once
  • Copy to site… in the block editor’s Options menu

Pick the site and click Copy. The list only shows sites you can copy that post to. The copy lands as a draft, and a notice links to it and lists anything that was skipped, with the reason.

It handles the references that break an import:

  • Media. The featured image and the images the content uses are copied into the other site’s uploads, with their title, caption, description and alt text. Subset Clone rewrites both the attachment IDs and the upload URLs in the content to match the new files. Copy the same post again and it reuses the media it copied last time.
  • Terms. Categories, tags and custom taxonomy terms are matched on the other site by slug, a child term through its parents. Missing ones are created, or left off if a network admin chooses Only use the ones it already has.
  • Author. The copy keeps its author if that person is a member of the other site. Otherwise you become the author.
  • Failures. If any step of a copy fails, the copy and any media it brought across are deleted, so you don’t get a half-made post.

To copy, you need to be allowed to duplicate the post on the site you’re on. On the other site you need to be a super admin, or a member who can create that type of content.

For scripts, the WP-CLI command takes the target site as an ID or URL:

wp subset duplicator duplicate 42 --user=admin --to-site=3

The REST route takes a target_site site ID. Installing Pro, the full list of what comes across and the permission rules are on copy to another site. The free Subset Clone plugin, which Pro needs, makes copies on the same site; getting started with Subset Clone covers it.