Skip to content

[00] Subset Clone, User guide

Rewrite & Republish

Use Subset Clone Pro to rework a published post in a draft copy, then republish it over the original without changing its address, author or comments.

Rewrite & Republish lets you rework a published post or page while the live version stays as it is. You edit a draft copy, called a rewrite, for as long as you need. When it’s ready, you republish it: its content replaces the published version, which keeps its address, author and comments, and the rewrite moves to the trash. This page covers starting a rewrite, republishing it now or on a date, what changes and what stays, and who can do it.

It needs Subset Clone 0.12.0 or later and Subset Clone Pro 0.5.0 or later. It works on single sites and on networks.

Start a rewrite

You can rewrite a published post or page of any content type that has the Duplicate actions. Start one from any of these:

  • Posts or pages list: hover over the item and click Rewrite & Republish. To start several, tick them and choose Rewrite & Republish from the bulk actions.
  • Block editor: open the Options menu (the three dots at the top right) and choose Rewrite & Republish.
  • Classic editor: click Rewrite & Republish in the Publish box.
  • Admin bar: click Rewrite & Republish while you view or edit the post.

The rewrite opens in the editor. It’s a draft with the same title, content, custom fields, featured image and terms as the published version, and a notice at the top says which post it will replace. The rewrite copies the last saved version, so save your changes on the published post first if you want them in the rewrite.

A post can have one rewrite at a time. While it has one, its lists and editor show Edit rewrite instead, and the published post’s editor warns that anything you change there will be replaced when the rewrite is republished.

Republish

In the block editor:

  1. Click Republish (the Publish button, renamed for a rewrite).
  2. Read the Republish panel in the publish checks. It says which post will be replaced and has the date option.
  3. Click Republish.

The published version opens, with a notice that it was republished. In the classic editor, click Republish in the Publish box.

From a posts or pages list, hover over the rewrite and click Republish…. A screen lists what will change, such as Title, Content and how many custom fields, and warns if anything will stop the republish. Click Republish now to go ahead, or Keep editing the rewrite.

To schedule it instead, set a date in the future, then click Schedule republish. The rewrite waits as a scheduled post, and the published version doesn’t change until then. At that time, WordPress’s own scheduler republishes it. The rewrite never goes live as a post of its own.

What changes and what stays

Part of the postAfter republishing
Title, content, excerpt, password, comment and pingback settings, order, parentThe rewrite’s.
Featured image and page templateThe rewrite’s.
Custom fieldsThe rewrite’s. A field you removed in the rewrite is removed. Fields that copies always leave out stay as they were.
Categories, tags and other termsThe rewrite’s. Polylang’s translation links aren’t touched.
Media uploaded to the rewriteMoves to the published version. Nothing is deleted.
Address (slug), author, status and commentsUnchanged.
DateUnchanged, unless you tick Give the published version today’s date.

Keeping the date means feeds and sitemaps don’t list the post as new.

Undo and refusals

Before it changes anything, a republish saves the published version as a revision, when its content type keeps revisions. To go back, open the post’s revisions and restore the one from before the republish. If revisions are off for that content type, the publish checks and the Republish… screen say the old version won’t be kept.

If any part of a republish fails, the published version is put back as it was and the rewrite stays a draft. The editor shows the reason.

A republish is refused while someone else has the published version open in the editor, so their changes aren’t lost. The message names them. Republish once they’ve finished.

A scheduled republish that finds someone editing tries again five minutes later. If it fails for another reason, the rewrite goes back to being a draft, and its editor says why.

Discard a rewrite

Click Discard rewrite in the rewrite’s sidebar panel, the classic editor’s Publish box or the Republish… screen. The rewrite moves to the trash and the published version stays as it is. Restored from the trash, it’s an ordinary draft, no longer linked to the published post.

Who can rewrite and republish

  • Starting a rewrite needs permission to duplicate the post: see Who can duplicate.
  • Republishing needs permission to edit both the rewrite and the published post, and to publish that content type. Editors and administrators can. Authors can republish their own posts.
  • Discarding needs permission to edit both posts.

If someone who can’t republish clicks Republish, the rewrite stays a draft and the editor says why.

Settings

Under Subset → Clone, the Rewrite & Republish section has two settings:

  • Show Rewrite & Republish on published content: on by default. Turn it off to hide the actions. Rewrites already started can still be republished or discarded.
  • Give a republished post today’s date: off by default. It sets the starting state of the date option for each republish.

From WP-CLI they’re rewrite_enabled and rewrite_update_date:

wp subset duplicator settings set rewrite_enabled off

To start, republish and discard rewrites from WP-CLI, see rewrite (Pro). The REST routes and hooks are in the developer reference.