The official WordPress plugin for WPSignal. WordSocket enables developers to connect their site to a secure WebSocket relay.
Events are published over one WebSocket per browser, with an SSE fallback, and their contents are AES-256-GCM encrypted before they leave WordPress with a key derived from the site's own salts, so the relay carries ciphertext it cannot read. WordSocket also registers a Yjs sync provider, so Gutenberg's real-time collaboration runs over the same connection instead of HTTP polling.
The easiest way is to download is wordpress.org/plugins/wordsocket.
wp plugin install wordsocket --activate// Fire on any WordPress action hook
WPS::trigger( 'comment.posted' )
->on( 'wp_insert_comment', 10, 2 )
->channel( 'events' )
->data( fn( $id, $comment ) => [ 'author' => $comment->comment_author ] )
->register();type Comment = {
// ...
};
// Handle it in the browser
const on = WPS.on( 'comment.posted', (comment: Comment) => {
// Do cool things with the new `comment`
});Full documentation, API reference, and guides are at wpsignal.io/docs.
Plugins built on WordSocket, each one installed alongside it and rendering its own panel on WordSocket's Extensions tab. Source for all of them: wpsignal/wordsocket-extensions.
| Extension | What it does |
|---|---|
| ShopSocket | Shopify's Live View, for WooCommerce: a live orders board for your team, and live stock on product pages. On WordPress.org, or try the live demo store. |
Building your own is documented here: register it with WPS::extensions()->register(), reserve a channel namespace, and share the connection WordSocket already holds.
Example plugins built on WordSocket, made to read rather than to install: wpsignal/wordsocket-examples.
Full changelog can be viewed in CHANGELOG.md
GPL-2.0-or-later
