Plugins built for Pusher now connect to WordPlus Cloud

Some WordPress plugins add their live features through the Pusher Channels protocol: notifications that appear without a reload, dashboards and order lists that update on their own, live comments and chats. From today WordPlus Cloud speaks that protocol too, so those plugins can run on the same cloud as ours, on your WordPlus Cloud subscription.
What the Pusher-compatible API is
The Pusher-compatible API speaks version 7 of the Pusher Channels protocol, the current one. Plugins built for Pusher, and the client and server libraries they use, connect to the cloud as they are, with nothing in their code changed. You enter our hosts and the keys of your site in their settings, and their channels, presence and events run on the cloud.
Every site on a WordPlus Cloud subscription has its own app ID, key and secret, in your account under Sites → Realtime API keys. A site does not need any of our plugins to get them: add it under Sites → Add site.
Connecting a plugin
A plugin built for Pusher can connect when its settings let you enter a host. Fill them in like this:
| Setting | Value |
|---|---|
| WebSocket host | ws.wordplus.cloud |
| HTTP API host | rest.wordplus.cloud |
| Port | 443, with TLS on |
| App ID, key and secret | Those of your site, from Sites → Realtime API keys |
| Cluster | Any value, such as mt1, if the plugin asks for one |
The cluster makes no difference, since the host is the one used. A plugin that asks only for a cluster, with no field for a host, cannot connect yet. Ask its author to add one, a small change on their side.
A plugin with a single host field takes ws.wordplus.cloud for both, since it answers the HTTP API too.
Keep the secret on your server. It signs the events your site sends, so it never belongs in a page.
In your own code
A theme or your own code connects the same way. In the browser:
const pusher = new Pusher('YOUR_KEY', {
cluster: 'mt1',
wsHost: 'ws.wordplus.cloud',
wsPort: 443,
wssPort: 443,
forceTLS: true,
enabledTransports: ['ws', 'wss'],
});
pusher.subscribe('orders').bind('new-order', (order) => {
showOrder(order);
});Your server sends events through the HTTP API host, rest.wordplus.cloud, with the app ID, key and secret of the site. The Pusher-compatible API docs have these settings, with examples for Laravel, Laravel Echo, PHP and Node.js.
What is supported
- Public, private, presence and encrypted channels
- Client events on private and presence channels, up to 10 a second per connection
- User sign-in, and events sent to a user
- The HTTP API: an event to up to 100 channels at once, batches of up to 10 events, channels and their users, and closing the connections of a user
- Events of up to 10 KB
Webhooks are not supported yet, and a cache channel does not replay its last event yet, so it always reports a miss. Connections use WebSocket only, with no HTTP fallback.
Beside our own plugins
WordPlus plugins do not use this API. They talk to the cloud over our own protocols, made for what they do, such as messages, calls and live streams, and they share one connection per page. A plugin built for Pusher opens its own connection beside theirs, and both run on the same subscription.
And our realtime SDKs
The Pusher-compatible API is for plugins that already exist. For new code there are our realtime SDKs: rooms, presence, calls and group calls for any plugin, theme or custom code on WordPress, and for your own apps on other stacks. They share the one connection a page has with our plugins, connect directly to our servers, and move to another server without a drop when one restarts. WordPlus Cloud for WordPress and WordPlus Cloud for Apps show what they do. Our WebSocket API page shows rooms, presence and events in each stack.
Getting started
- Subscribe to WordPlus Cloud for your site on the pricing page.
- In your account, open Sites → Realtime API keys and copy the app ID, key and secret of the site.
- Enter them, with our hosts, in the settings of the plugin.
If a plugin does not connect, or you would like us to look at one before you subscribe, write to us at support@wordplus.cloud.