[wp-trac] [WordPress Trac] #64622: Real-time collaboration: Add new REST endpoints, setting, and registered post meta

WordPress Trac noreply at wordpress.org
Thu Feb 19 10:25:26 UTC 2026


#64622: Real-time collaboration: Add new REST endpoints, setting, and registered
post meta
----------------------------+------------------------------
 Reporter:  czarate         |       Owner:  ellatrix
     Type:  task (blessed)  |      Status:  closed
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Editor          |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------------
Changes (by ellatrix):

 * owner:  (none) => ellatrix
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61689" 61689]:
 {{{
 #!CommitTicketReference repository="" revision="61689"
 Real-time collaboration: add new REST endpoints, setting, and registered
 post meta.

 Syncs/merges the PHP changes from the Gutenberg PR
 https://github.com/WordPress/gutenberg/pull/75366.

 In Gutenberg, we have added support for real-time collaboration using CRDT
 documents (via the [Yjs library](https://yjs.dev/)). 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 PR provides a proposed implementation of the changes above. 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

 Developed https://github.com/WordPress/wordpress-develop/pull/10894.

 Props czarate, paulkevan, ellatrix, timothyblynjacobs, westonruter,
 jorgefilipecosta, mindctrl.
 Fixes #64622.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64622#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list