[wp-trac] [WordPress Trac] #64622: Real-time collaboration: Add new REST endpoints, setting, and registered post meta
WordPress Trac
noreply at wordpress.org
Tue Feb 10 15:21:43 UTC 2026
#64622: Real-time collaboration: Add new REST endpoints, setting, and registered
post meta
-------------------------+-----------------------------
Reporter: czarate | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
In Gutenberg, we have added support for real-time collaboration using CRDT
documents (via the [https://yjs.dev/ Yjs library]). This work has
suggested the following additions to WordPress:
1. A default "sync provider" based on HTTP polling that allows
collaborators to share updates with each other. Previously, we relied on
WebRTC connections between collaborators for this purpose, but it proved
unreliable under many network conditions.
- Our solution is designed to work on any WordPress installation.
- HTTP polling is the transport we identified as most likely to work
universally.
- Given the isolation and lifecycle of PHP processes, updates must be
stored centrally in order to be shared among peers. We have chosen to
store updates in post meta against a special post type, but alternate
storage mechanisms are possible.
- Collaborative editing can involve syncing multiple CRDT documents. To
limit the number of connections consumed by this provider, requests are
batched.
- To prevent unbounded linear growth, updates are periodically
compacted.
- To avoid excessive load on lower-resourced hosts, this provider will
benefit from usage limits (e.g., a maximum of three connected
collaborators) enforced by the client (Gutenberg).
2. A new registered post meta that allows Gutenberg to persist CRDT
documents alongside posts.
- This provides all collaborators with a "shared starting point" for
the collaborative session, which avoids duplicate updates.
- Content stored in the WordPress database always remains the source of
truth. If the content differs from the persisted CRDT document, the CRDT
document is updated to match the database.
3. A new Writing setting that allows users to opt-in to real-time
collaboration.
- Enabling real-time collaboration disables post lock functionality and
connects users to the sync provider.
4. A behavior change to autosaves is needed. When the the original author
is editing a draft post (post_status == 'draft' OR 'auto-draft') and they
hold the post lock, the autosave targets the actual post instead of an
autosave revision. This puts the post data and the persisted CRDT document
out of sync and leads to duplicate updates. When real-time collaboration
is enabled, all collaborators must autosave in the same way.
This `wordpress-develop` PR provides a proposed implementation of the
changes above, but discussion is no doubt needed:
https://github.com/WordPress/wordpress-develop/pull/10894
This corresponding Gutenberg PR moves the work from the `experimental`
directory to `lib/compat`:
https://github.com/WordPress/gutenberg/pull/75366
Cumulative work to add this functionality can be found using this label:
https://github.com/WordPress/gutenberg/issues?q=label%3A%22%5BFeature%5D
%20Real-time%20Collaboration%22%20is%3Apr
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64622>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list