Linux 软件免费装
Banner图

WordSocket

开发者 wpsignal
更新时间 2026年9月13日 04:16
PHP版本: 8.2 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

woocommerce events collaboration realtime websocket

下载

0.18.0 0.20.0 0.20.1 0.16.0 0.21.0 0.21.1 0.13.1 0.13.2 0.14.0 0.13.0 0.15.0 0.15.1 0.17.0 0.18.1 0.19.0

详情介绍:

WordSocket sends realtime events from your WordPress site to connected browsers. When content changes: a post is published, a comment is approved, an option is updated: the plugin pushes the event to subscribers instantly via WebSocket (with SSE fallback). When real-time collaboration is available (currently via the Gutenberg plugin, ahead of its arrival in WordPress core), WordSocket also registers as a WebSocket-based Yjs sync provider for realtime collaborative editing in the block editor, replacing the default HTTP polling transport with a low-latency WebSocket connection. WPSignal is an independent service and is not affiliated with or endorsed by the WordPress project. Features: How it works:
  1. Install the plugin and connect to the WPSignal service.
  2. When content changes in WordPress, the plugin encrypts and publishes an HMAC-signed event to the WPSignal server.
  3. The server pushes the ciphertext to all browsers subscribed to that channel.
  4. The browser decrypts the payload and dispatches wpsignal:* DOM events. The relay never sees plaintext content.
  5. When real-time collaboration is available on the site, the block editor uses the same WebSocket connection for collaborative editing with no extra configuration.
Real-Time Collaboration WordSocket ships a WebSocket sync provider for the block editor's real-time collaboration feature. Three things need to be true for it to activate:
  1. The Gutenberg plugin is active. Real-time collaboration was removed from WordPress core before the 7.0 release; until it ships in core, the feature is only available through the Gutenberg plugin.
  2. Real-time collaboration is enabled under Gutenberg > Experiments > Enable real-time collaboration (Gutenberg 23.8 and later; earlier versions used Settings > Writing).
  3. The site is connected to WPSignal, since the provider shares the plugin's WebSocket connection.
The WordSocket Settings tab shows a "Gutenberg detected" badge when the feature is available on your site. Once active, everything collaboration syncs travels over the WebSocket instead of HTTP polling: document updates, cursors and presence, and collaborative notes. If the connection drops, the provider reconnects with increasing delays; after repeated failures the editor shows its standard "connection lost" dialog, and documents re-sync when the connection returns. If a site's credentials are revoked, the editor reports an authentication error instead of retrying forever. The site editor does not use sync providers (core disables collaboration there). Disabling the provider from the Settings tab restores WordPress HTTP polling for all editors. Third-Party Service This plugin connects to the WPSignal service at api.wpsignal.io for the following operations: Event payloads are AES-256-GCM encrypted before leaving WordPress. The WPSignal server relays ciphertext and never has access to plaintext message content. Data is delivered in realtime and is not persisted on the server. Setup https://www.youtube.com/watch?v=yS1roK49HEQ Showcase Below are a few examples showcasing the possibilities with WP Signal + WordSocket. Repository https://github.com/wpsignal/wordsocket-examples Living Posts - Interactivity API https://www.youtube.com/watch?v=2F6zqQrrDXk Source code: https://github.com/wpsignal/wordsocket-examples Bidirectional Realtime Chat Plugin https://www.youtube.com/watch?v=vpKjs5kYnvI&t Realtime Poker Plugin https://www.youtube.com/watch?v=FVvpITS29oI

安装:

  1. Upload the wordsocket folder to /wp-content/plugins/, or install directly from the WordPress plugin directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Go to WordSocket > Settings and open the Connect tab.
  4. Choose a connection method:
  5. Automatic (recommended): Click Connect with WPSignal. You will be redirected to the WPSignal dashboard to authorize the connection. No API key entry required.
  6. Manual: Switch to the Manual tab, paste your API key, and click Save Settings.
  7. The plugin registers with the server and saves credentials automatically.
To create an account, visit wpsignal.io.

屏幕截图:

  • Connect tab (Manual): paste your API key directly for setups where the automatic flow is unavailable.
  • Connect tab (Automatic): post authentication and green banner is displayed with the words "Connected".
  • Triggers tab: no-code trigger builder. Map WordPress action hooks to realtime events with channel and event name fields.
  • Explorer tab (disconnected): Event Log, Publish Test Event form, and Token Inspector panels ready to connect.
  • Explorer tab (connected): live Event Log showing an active WebSocket connection and an incoming encrypted event, with a test event published successfully.

升级注意事项:

0.21.1 See changelog for details. 0.21.0 Adds the Extensions tab and the extension API, private channel namespaces for plugin developers, and now requires PHP 8.2. 0.20.1 Fixes a reconnect loop after credentials are revoked on the server and a Disconnect that could not complete after regenerating the dashboard API key. 0.20.0 Security: the token endpoint now requires a logged-in user by default (use the wpsignal_allow_client filter for public sites). Publish failures are now visible in wp-admin and reconnects back off with jitter. 0.19.0 New: real-time collaboration re-enabled via Gutenberg detection: the Yjs provider activates when wp_is_collaboration_enabled() reports RTC available and enabled, with a Gutenberg detected badge in the Settings tab 0.18.1 Security fixes 0.18.0 Pluggable WS/SSE transports with window.WPS.status 0.17.0 Prevent connection attempts when no auth 0.16.0 Remove rtc functionality and added feedback form 0.15.1 Fixed: skip Yjs update and awareness messages when no peers are connected 0.15.0 Fixed: real-time sync on remote server — channel subscribed after SYNC_STEP_1 sent 0.14.0 Revamp admin ui, moved explorer to settings app 0.13.2 remove self-hosted text 0.13.1 Updated screenshots 0.13.0 Exclude BETA.md from plugin build 0.12.0 feat: skeleton preloader for app.feat: disable automatic authentication for non-ssl.fix: disable encryption when on non-ssl. 0.11.0 feat: skeleton preloader for app.feat: disable automatic authentication for non-ssl.fix: disable encryption when on non-ssl. 0.10.0 feat: skeleton preloader for app. feat: disable automatic authentication for non-ssl. fix: disable encryption when on non-ssl. 0.9.0 Fix: non-ssl default to manual authentication 0.7.0 Adds one-click automatic connection, a Disconnect button, and per-site JWT secrets. No configuration changes required for existing connections. To use the automatic flow on a new site, go to WordSocket > Settings, open the Connect tab and choose Automatic. 0.6.0 Simplified settings UI: the Server URL field has been removed. Re-enter your API Key and click Connect if your site does not show as connected after upgrading. 0.5.1 Fixes Yjs provider compatibility with WordPress 7.0 Beta 2, including collection-level sync (collaborative notes). No configuration changes required. 0.5.0 Adds PHP filters for extending JWT channel access and fixes subscribe()/unsubscribe() on SSE connections. No configuration changes required. 0.4.0 Adds relay-blind AES-256-GCM encryption for all event payloads. No configuration required: encryption is automatic after connecting. The WPSignal relay never has access to plaintext message content. 0.3.0 Adds real-time collaborative editing support for WordPress 7.0+. No configuration changes required: the collaboration provider is enabled by default and can be toggled from WordSocket > Settings. 0.2.0 Major update with new admin UI, custom triggers, and public JS API. Existing installations will continue to work: no configuration changes required.

常见问题:

What is WPSignal?

WPSignal is a realtime event delivery service for WordPress. It pushes events from your site to connected browsers the moment they happen, without polling.

Do I need a wpsignal.io account?

Yes. The plugin requires a WPSignal account to relay events. Create a free account at wpsignal.io.

What data is sent to the WPSignal server?

During registration: your site URL and name. During normal operation: AES-256-GCM encrypted event payloads (the server never sees plaintext content). When real-time collaboration is enabled, Yjs document updates (binary diffs of block editor content) are also relayed. All data is delivered in realtime and is not stored on the server. See our Privacy Policy for full details.

Are my event payloads private?

Event payloads are encrypted with AES-256-GCM before leaving WordPress. The encryption key is derived from your WordPress salts and site key using HKDF-SHA256, and is never sent to the WPSignal server. This means the relay cannot read your message content. Note: all logged-in users on the same site share the same derived key. Per-user message privacy is out of scope for the current version.

Why is real-time collaboration unavailable on my site?

Real-time collaboration was removed from WordPress core before the 7.0 release and currently ships with the Gutenberg plugin as an experiment. Install and activate Gutenberg, then turn on Gutenberg > Experiments > "Enable real-time collaboration". The WordSocket Settings tab shows a "Gutenberg detected" badge when the feature is available, and the sync provider activates automatically once collaboration is enabled. Post types without custom-fields support are excluded by Gutenberg itself.

Does this work for logged-out visitors?

The built-in client script and the token endpoint (/wp-json/wpsignal/v1/token) are limited to logged-in users by default. To open them to all visitors, return true from the wpsignal_allow_client filter: add_filter( 'wpsignal_allow_client', '__return_true' ); Tokens minted for visitors carry user ID 0 and are scoped to your site, so keep in mind that anyone can then subscribe to your site's public channels and publish over the WebSocket.

What happens when I disconnect?

The plugin tells the WPSignal server to archive the site, then deletes the stored credentials (site key, secrets, and the API key if you connected manually). Your usage history stays on the server, and connecting the same site URL again restores the site with fresh secrets. On a manual connection you will need to paste the API key again. If the server cannot be reached, nothing is deleted and you can retry.

Why was my connection refused?

The WPSignal dashboard refuses to authorize a site when your plan's site limit is reached (the message names the site to disconnect first), when your account email is not yet verified, or when the account has been deactivated. The Connect tab shows the exact reason returned by the server.

How do extensions plug in?

An extension is a separate plugin built on WordSocket (WooCommerce, Live Blog, and Chat are on the way). Its settings appear on the WordSocket settings page under the Extensions tab, which also lists what is available. Developers: register on wpsignal_loaded with WPS::instance()->extensions()->register(), enqueue a settings script on the wordsocket_settings_enqueue action with wpsignal-settings as a dependency, and render window.wordsocket.ExtensionPanel from a plugin registered with wp.plugins.registerPlugin( slug, { scope: 'wordsocket', render } ).

Can I make a channel private?

Yes. Reserve a namespace on wpsignal_loaded: WPS::instance()->channels()->reserve( 'orders', 'manage_woocommerce' ) (a capability, or a callable receiving the user ID). The relay then refuses subscribe and publish frames on that namespace from anyone else. Once any namespace is reserved, tokens list channels explicitly instead of allowing every channel of the site, so register each channel you subscribe to through the wpsignal_token_channels filter. Payload encryption is site-wide and is not a privacy boundary between users; the channel gate is.

Why did events stop?

Each plan has a monthly message quota. When it is reached the server answers publishes with "quota exceeded" and the plugin pauses publishing until the first day of the next month (UTC). The Connect tab on the WordSocket settings page shows this, as well as rejected credentials (disconnect and connect again) and an unreachable server, and clears the warning as soon as the server answers again. There is no admin notice.

What happens if WebSocket is unavailable?

The client falls back to SSE for receiving events. window.WPS.subscribe() and window.WPS.unsubscribe() work on SSE connections: channel changes are tracked and applied immediately via a lightweight SSE reconnect (50 ms debounce). For collaborative editing, the plugin detects the fallback and emits a "not synced" status so WordPress can surface the appropriate indicator. You can also disable the collaboration provider entirely from the WordSocket Settings tab to restore WordPress HTTP polling for all editors.

更新日志:

0.21.1 0.21.0 0.20.1 0.20.0 0.19.0 0.18.1 0.18.0 0.17.0 0.16.0 0.15.1 0.15.0 0.14.0 0.13.2 0.13.1 0.13.0 0.12.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0