---
title: "Content ReSync - PerfLocale"
description: "Bring translations up to date after the original changes: only changed parts are updated or machine-translated, with an estimate first and review with Undo."
canonical: "https://perflocale.com/docs/content-resync/"
source: "https://perflocale.com/docs/content-resync/"
format: "markdown"
---
# Content ReSync

Update translations when the original changes.

Content ReSync is off until you turn it on under **PerfLocale → Settings → Translation → Content ReSync**. While it is off, it adds nothing to your site. When the original of a post changes, its translations are marked _Needs Update_ (see [Content Translation](https://perflocale.com/docs/content-translation/)). Content ReSync brings them up to date: it finds the parts of the original that changed, keeps the translation of every part that did not, and fills the changed and new parts from the original, either in the source language for a translator or machine-translated. Updates to published translations wait for a person on the **Review update** screen.

## Where to start a resync

-   **One translation:** in the block editor’s **Translations** panel of a translation, **Resync from source**. On the original, **Resync all translations**. The classic editor’s Translations box has the same actions. Save first: a resync uses the saved version.
-   **Many translations:** on **PerfLocale → Translations**, the row action **Resync**, the bulk action **Update translations**, or the **Update translations** button while the status filter is _Needs Update_. **Settings → Translation** has the same button next to **Generate Missing Translations**.

The **Update translations** dialog asks for the target languages, the content types and what to update: _Outdated translations: resync them with their source_, _Missing translations: create them as drafts_ (empty, or machine-translated when a provider is ready), and _Also record translations that are up to date_. Its only button is **Estimate**.

## The estimate

A run that would send text to machine translation or create translations shows an estimate first: how many translations it updates, how many parts it reuses, leaves in the source language or machine-translates, and how many characters it sends to machine translation. Nothing changes until you press **Start**; **Cancel** leaves everything as it is. A run that sends nothing and creates nothing starts at once. A bulk run continues in the background; follow it under [Jobs](https://perflocale.com/docs/background-jobs/).

## Review update

An update is written at once when nothing in it needs a person. It waits for review when, for example, the translation is published and the update holds machine translations, near matches or parts left in the source language, or when the translation was changed outside ReSync. The screen says why (“Held because: …”) and shows each part with its new source text, the current translation and the proposal, plus the title, content, excerpt and field changes.

-   **Apply** writes the proposal. **Apply and edit** writes it and opens the translation in the editor.
-   **Reject** drops it; later runs do not propose the same update again.
-   **Mark as up to date** writes nothing. The translation stays as it is and is recorded as in sync with the current original and is no longer marked _Needs update_. Use it when you translated the change by hand in the editor.
-   **Undo**, after an Apply, puts the earlier text back. The screen shows _Before and now_ side by side.

Apply, Reject and Mark as up to date are for approvers: users with the `perflocale_approve_translations` capability, administrators and super admins. A translator without it can read the proposal but sees no decision buttons. Mark as up to date is decided one update at a time: on **PerfLocale → Translations**, open each from its _Update waiting_ link, or run `wp perflocale review keep <id>` with an id from `wp perflocale review list` (see [WP-CLI Commands](https://perflocale.com/docs/wp-cli/#content-resync)).

### Comparing block by block

For a post written in the block editor, the **Content** section compares each block as it is _Now_ with what is _Proposed_. It starts with a count, such as “2 blocks changed”, and marks every block as _New_, _Removed_ or _Changed_. Blocks that did not change are folded away under “Show N blocks that did not change”. After an Apply, _Before and now_ compares the same way.

-   **Visual** shows each side as the block editor draws it, read-only. A block from another plugin is shown as its text, because its editor code is not loaded on this screen.
-   **Code** shows each block’s markup, with a changed block as a text diff. Without JavaScript this is the only view.
-   The Visual view is offered only when saving the proposal with your account would store it exactly as proposed. If it would not, or the update holds added code, only the Code view shows, with a note.
-   A new or changed block shows the original’s text next to it, and a _Machine translated_ label when machine translation wrote it. The original’s text shows only to a user who may read the source.
-   **Open the translation in the editor** and **Open the source in the editor** sit above the comparison, each only for a user who may edit that post.

Content with no blocks, content that cannot be split into blocks, and content too large to compare here are compared line by line, with a note.

Sometimes a source change cannot be placed next to text a person wrote in the translation. The screen then says so and writes nothing for that change: translate it in the editor, then press Mark as up to date.

### A translation with no starting point

Content ReSync compares the original with an earlier version of it. A translation with no earlier version to compare with is left unchanged, and the result says so. Bring it up to date by hand once, then use **Track changes from now** in that message. It records the current original as the starting point and writes nothing to the translation. After that, **Resync from source** brings over later changes to the original.

When the translation is edited after an update was proposed, **Apply** refuses the old proposal: reject it and run the resync again to get one built on the current text.

## Settings

Under **PerfLocale → Settings → Translation → Content ReSync**. The other settings appear after you turn it on.

| Setting | Default | What it does |
| --- | --- | --- |
| Content ReSync: Turn on Content ReSync | Off | Tick it to use Content ReSync. While it is off, it adds nothing to your site: no screens, buttons, background jobs or notices. Its records are kept, and the first run after you turn it back on reads every source again. |
| Include | Every translatable post type, and Custom fields | An unticked type is never resynced. A post type the site starts to translate later is included. |
| Changed and new parts | Leave them in the source language for a translator | Machine translate them appears while machine translation is on. Only the changed and new parts are sent. |
| Near matches | Off: update every changed part | Keeps the old translation of a part whose text is at least 95, 90, 85 or 80% the same. Such a translation stays Needs Update until a person checks it. |
| Keep per-language blocks and media | On | Keeps blocks that exist only in a translation, and images and links changed for its language. Unticked, an update that removes them always waits for review. |
| When a translation was edited outside ReSync | Ask every time (recommended) | Ask every time: each update that would change an edited part waits on the review screen. Ask once, then follow the original: the first update after the edit waits for review; after you apply or keep it, later updates do not wait because of that edit. Never ask: replace those edits with the original: the next update replaces the edited text with the original, and every update can be undone. Runs without a signed-in user, such as scheduled runs, still ask. Edits in the editor and changes made by other plugins both count. |

With _Machine translate them_, the [context](https://perflocale.com/docs/machine-translation/#context) set under the machine-translation settings is sent with each changed part to DeepL and the WordPress AI Client.

## What counts as changed

Content ReSync compares the title, content, excerpt and, with _Custom fields_ included, the translatable custom fields, for example an SEO keyword or an ACF text field. A field that was empty on a translation and later changed on the original is updated. A field that becomes machine-translatable while it holds no text is not a change, and a field that cannot be read never counts as unchanged.

## Large runs and memory

The part of a run that does not finish within 20 seconds of the request that started it continues as a `content_resync` background job. **Settings → Performance → Background Thresholds** has a row _Content ReSync (Update translations)_. A run keeps memory free for WordPress’s own option writes; a post too large for the PHP memory limit is skipped and named, so raise the limit or update it by hand. A data import blocks ReSync while it runs.

If a ReSync table is missing, a run or estimate says so and names the fix: **Retry now** under **Tools → Site Health**, or `wp perflocale db-migrate` (see [Troubleshooting](https://perflocale.com/docs/troubleshooting/)).

## For developers

-   [`perflocale/resync/enabled`](https://perflocale.com/docs/hooks/#perflocale-resync-enabled), [`perflocale/resync/object_types`](https://perflocale.com/docs/hooks/#perflocale-resync-object-types) and [`perflocale/resync/include_object`](https://perflocale.com/docs/hooks/#perflocale-resync-include-object) decide what Content ReSync covers.
-   [`perflocale/resync/block_text_attributes`](https://perflocale.com/docs/hooks/#perflocale-resync-block-text-attributes), [`perflocale/resync/structural_attributes`](https://perflocale.com/docs/hooks/#perflocale-resync-structural-attributes) and [`perflocale/resync/structural_class_prefixes`](https://perflocale.com/docs/hooks/#perflocale-resync-structural-class-prefixes) tell it which parts of a third-party block are text and which are structure.
-   The job budgets and the JavaScript events `perflocale.resync.started`, `.failed` and `.completed` are in the [hooks reference](https://perflocale.com/docs/hooks/).
