Presence API
See who is logged in, which admin screen they are on, and which posts they are editing.
“You log into your WordPress, I see oh Matias is moderating some comments, Lynn is on the dashboard maybe reading some news… that idea of like you log in and you can kind of see the neighborhood of like who else is also there.”
Matt Mullenweg, WordPress 7.0 planning session
Try it in your browser
WordPress Playground starts a scratch site with the plugin active and a hundred people already online. A scene plays people editing together on the Posts screen.
Install it on your site
Presence API is a feature plugin in the WordPress plugin directory.
Who has it open
An Editors column on post lists.
The Posts list shows who has each post open.
Online now
An Online view on the Users list.
Filter the Users list to the people online right now.
A screen that changed
A notice when someone else saves.
When someone else saves a screen you have open, such as Settings or a post, a notice tells you it changed.
Network Admin
Who's Online, for the whole network.
On multisite, a Who's Online widget lists the busiest sites and how many people are on each, with an Online column on Sites and Users.
A switch for each feature
On Settings > Presence API.
Every feature is on until a site switches it off.
More details
-
Synced patterns
A notice on a synced pattern in the block editor while someone else edits the pattern itself.
-
AI agents
Labelled in the admin bar, the Active Posts widget and the Editors column, once a plugin such as Agent Users marks them.
-
In the block editor, too
A plugin that adds real-time collaboration to the block editor can keep its awareness rows in the presence table, so someone editing a post also shows up in the admin bar and the post list. gutenberg-sync-engines has a Presence API backend that does this.
Built for every host
Tracking who is where takes frequent writes, and in post meta or options those writes clear caches across the whole site (#64696). Presence API writes to its own table instead, through the Heartbeat API WordPress already runs.
-
One table
wp_presence, with a unique key on room and client. -
150 seconds
How long a row counts as present without a fresh heartbeat.
-
Post locks
_edit_locklives in the presence table, so refreshing a lock no longer makes cached post queries stale. -
No extra services
No object cache, no WebSockets. Anything a host adds is a bonus.
For developers
The docs explain how presence works, with a diagram for each part. PHP functions, REST endpoints, WP-CLI commands, filters and room conventions are documented in the GitHub repository.
// Put this client in a post's room.
wp_set_presence(
'postType/post:42',
$client_id,
array( 'screen' => 'edit' ),
array( 'user_id' => get_current_user_id() )
);
// Read who is in it.
$entries = wp_get_presence( 'postType/post:42' );
// In a script that depends on wp-presence.
const { users } = wp.presence.usePresenceUsers( room );
GET /wp-presence/v1/presence?room=admin/online
wp presence summary
Get involved
Presence API is a feature plugin sponsored by the Core team. If core adopts it, it would land one piece at a time.