# @wordpress/sync

> Sync Data.

Latest version **1.55.0** (published 2026-09-10) · GPL-2.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @wordpress/sync
pnpm add @wordpress/sync
yarn add @wordpress/sync
bun add @wordpress/sync
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.55.0 |
| Published | 2026-09-10 |
| First published | 2023-08-17 |
| Weekly downloads | 0 |
| License | GPL-2.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.12.0 |
| Dependencies | 9 |
| Unpacked size | 1007.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11753 |
| Author | The WordPress Contributors |
| Maintainers | garypendergast, adamsilverstein, gziolo, ntwb, riad, noisysocks, kadamwhite, gutenbergplugin, jorgefilipecosta, ellatrix, iandunn206, whyisjake, ockham, sirreal, nosolosw, wpisabel, ntsekouras, nerrad, desrosj, talldanwp, peterwilsoncc, ryanwelcher, mamaduka, aduth, johnbillion |
| Keywords | wordpress, gutenberg, sync |

## Links

- npm: https://www.npmjs.com/package/@wordpress/sync
- Repository: https://github.com/WordPress/gutenberg
- Homepage: https://github.com/WordPress/gutenberg/tree/HEAD/packages/sync/README.md
- Issues: https://github.com/WordPress/gutenberg/issues
- npm.io page: https://npm.io/package/@wordpress/sync

## Dependencies (9)

- [yjs](https://npm.io/package/yjs.md) ^13.6.29
- [diff](https://npm.io/package/diff.md) ^8.0.3
- [lib0](https://npm.io/package/lib0.md) ^0.2.99
- [y-protocols](https://npm.io/package/y-protocols.md) ^1.0.7
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^3.1.3
- [@wordpress/hooks](https://npm.io/package/@wordpress/hooks.md) ^4.55.0
- [@wordpress/api-fetch](https://npm.io/package/@wordpress/api-fetch.md) ^7.55.0
- [@wordpress/private-apis](https://npm.io/package/@wordpress/private-apis.md) ^1.55.0
- [@wordpress/undo-manager](https://npm.io/package/@wordpress/undo-manager.md) ^1.55.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.55.0 (latest) — 2026-09-10
- 1.54.1-next.v.202609031004.0 (next) — 2026-09-03
- 1.40.1 (wp-7.0) — 2026-06-30
- 1.33.1 (wp-6.9) — 2025-10-28
- 1.19.2 (wp-6.8) — 2025-07-08
- 1.8.1 (wp-6.7) — 2024-09-19
- 1.0.1 (wp-6.6) — 2024-06-11
- 0.13.1 (wp-6.5) — 2024-02-20
- 0.4.13 (wp-6.4) — 2023-11-13
- 0.2.1 (wp-6.3) — 2023-08-20
- 1.54.1-next.v.202608281122.0 — 2026-08-28
- 1.54.0 — 2026-08-26
- 1.53.0 — 2026-08-12
- 1.52.0 — 2026-07-29
- 1.51.0 — 2026-07-14
- … 137 more at https://npm.io/package/@wordpress/sync/versions

## README

# Sync

Sync entity data between peers for real-time collaboration using [CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) documents.

This package provides the syncing layer for real-time collaboration in the WordPress editor. It is built on [Yjs](https://docs.yjs.dev/), a CRDT implementation that enables multiple users to edit shared data concurrently without conflicts.

See [CODE.md](./CODE.md) for architecture details.

## Installation

Install the module

```bash
npm install @wordpress/sync --save
```

## API

<!-- START TOKEN(Autogenerated API docs) -->

### Awareness

The Awareness protocol should not be considered a public API. It is a third-party library that will experience breaking changes in the future.

In general, awareness for core entity types is implemented by the `core-data` package and third-party Yjs providers should not provide their own awareness implementation. However, it may be desirable for custom entities to have a custom awareness implementation.

### privateApis

Private @wordpress/sync APIs.

### Y

Yjs should not be considered a public API. It is a third-party library that _will_ experience breaking changes in the future. However, in order to allow third-party plugins to provide their own Yjs providers / sync transport, they must import and consume **our instance** of Yjs due to this bug / feature:

<https://github.com/yjs/yjs/issues/438>

In other words, external code must be able to import Yjs from the `@wordpress/sync` package in their code, e.g.:

```ts
import { Y } from '@wordpress/sync';
```

Additionally, this import must resolve to `wp.sync` via `DependencyExtractionWebpackPlugin`. If you are using an older version of `@wordpress/scripts` that does not treat `@wordpress/sync` as an unbundled package, then you can use Webpack externals to manually resolve the package to the global `wp.sync` variable:

```ts
externals: {
  ...existingConfig.externals,
  // Resolve @wordpress/sync to the global `wp.sync` provided by WordPress.
  '@wordpress/sync': 'wp.sync',

  // Resolve Yjs to the global `wp.sync.Y` provided by the sync package.
  // Since dependencies import 'yjs' directly, we need to avoid importing
  // and packaging two different Yjs instances, which would result in this
  // conflict:
  //
  // https://github.com/yjs/yjs/issues/438
  yjs: 'wp.sync.Y',
},
```

### YJS_VERSION

The major version of Yjs that is bundled and exported by this package. This can be used by third-party code to ensure that they are targeting a compatible version of Yjs.

<!-- END TOKEN(Autogenerated API docs) -->

## Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).

<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>

---
_Source: https://npm.io/package/@wordpress/sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
