Presence API

See who is logged in, which admin screen they are on, and which posts they are editing.

The dashboard with 101 people online, the admin bar's presence menu open, and Active Posts listing who is editing each post and page.
Faces in the admin bar show who is online and who is on this page, and Active Posts on the dashboard groups everyone by the post 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.

The Posts list, with an Editors column showing who has each post open.

Online now

An Online view on the Users list.

Filter the Users list to the people online right now.

The Users list filtered 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.

The notice someone sees when another person saves the settings screen they have open.

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.

Network Admin's Who's Online widget, listing the busiest sites and how many people are on each.

A switch for each feature

On Settings > Presence API.

Every feature is on until a site switches it off.

Settings > Presence API, where a site switches features off.

More details

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.

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.