Heartbeat Control

外掛說明

由 WP Rocket 開發的 Heartbeat Control 外掛能讓網站管理員幾個點擊就完成對 WordPress Heartbeat API 頻率的管理。

WordPress Heartbeat API 是一項很不錯的功能,它為網站管理員登入 WordPress 管理面板時,提供了伺服器及瀏覽器間的即時通訊。它使用了 /wp-admin/admin-ajax.php 這個檔案以執行瀏覽器呼叫的 AJAX 要求。依照預設,在內容編輯頁面中每隔 15 秒便會傳送一次 AJAX 要求,而在控制台頁面為每隔 60 秒便會傳送一次 AJAX 要求。

這項功能的確很有幫助,但是如果網站管理員長期開啟 WordPress 管理區域 (例如要撰寫或編輯文章),便會累積來自 Heartbeat API 的 AJAX 要求,並產生 CPU 高使用率,這會造成伺服器效能問題,甚至主機商會暫停你的主機代管帳號。

使用由 WP Rocket 開發的 Heartbeat Control,網站管理員便能輕鬆設定限制或完全停止 WordPress Heartbeat API 的活動。網站管理員也可以為指定位置新增規則,例如控制台、網站前端或內容編輯器。

如需進一步了解 WordPress 效能最佳化及網站加速的方式,請加入 WP Rocket Facebook 社團

相關外掛

  • WP Rocket:最優秀的快取外掛,它能為任何 WordPress 提供加速功能。
  • Lazy Load by WP Rocket:最優秀的延遲載入外掛,它能降低 HTTP 要求次數,並改善網站載入時間。
  • Imagify:最優秀的圖片最佳化外掛,能讓圖片以最佳畫質及檔案大小加速網站。

螢幕擷圖

  • Heartbeat API 設定
  • 精確修改 Heartbeat API 使用頻率

安裝方式

  1. 將由外掛壓縮檔解壓縮所得的 heartbeat-control 資料夾及其所包含的全部檔案上傳至 /wp-content/plugins/ 目錄。
  2. 在 [外掛] 頁面啟用 Heartbeat Control 外掛。
  3. 在 [外掛]→[控管 Heartbeat API] 能變更外掛全部設定。

常見問題集

如何變更外掛設定?

前往 [外掛]→[控管 Heartbeat API] 便能變更外掛全部設定。

為什麼會需要變更 WordPress 預設的活動訊號間隔?

如果長時間保持 WordPress 網站管理員的執行狀態,尤其在撰寫或編輯文章時,重複的 POST 要求會導致資源的高使用率。為避免產生這個狀況,修改或停用 WordPress 的活動訊號間隔可以降低網站伺服器的資源使用率。

發現外掛的安全性程式碼錯誤,該在何處回報?

使用者可以透過 Patchstack 漏洞揭露計畫回報在外掛原始程式碼中發現的任何安全性程式碼錯誤。Patchstack 團隊會協助使用者進行驗證及 CVE 指派,並負責通知外掛的開發者。

使用者評論

2024 年 2 月 8 日
I was suffering from 8-10 second delays between page loads. I tried everything I could think of to track it down, and neither tech support at Elegant Themes (DIVI Theme) nor my web hosting company Inmotion Hosting could find anything wrong as to the cause. Finally, I thought I'd try this this plug-in on a whim to see if the Heartbeat API was the cause. It was. I simply disabled the Heartbeat API on the front end using the Heartbeat Control plug-in and my pages were loading how they should without page caching in a fraction of a second. Later applied it to disable the back-end admin dashboard Heartbeat API and set the post editor heartbeat to 62 seconds (as many things seem to run on the exact minute). Simple to use interface, quick and convenient. This is an essential plug for WordPress.
2023 年 7 月 13 日
Much appreciate this plugin which allows me to have more control over optimizing my site - and for free.
2023 年 1 月 5 日
Ancient plugin, untested, produce errors as soon as you activate it: The plugin generated 630 characters of unexpected output during activation Also has errors on it's dashboard menu, trying to ping wordpress.org resulting in 404 error. Old bad, dangerous. Remove it from your site and WP repository.
2022 年 11 月 9 日
All the three options in "General settings" are not displayed. When I deactivate EverlightBox, everything goes back to normal. I have WP v. 6.1 and the free version of Event Star theme (with Gutentor - Gutenberg Blocks and SiteOrigin page builders). Cheers 🙂
閱讀全部 69 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Heartbeat Control〉的開發相關工作。

參與者

〈Heartbeat Control〉外掛目前已有 10 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Heartbeat Control〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.0.1

  • Fix PHP warnings & deprecated notices

2.0 – 2019/11/04

  • Revamp the settings page.

1.2.5

  • Fixed issue caused by previous version deployment.
  • Added hbc_disable_notice hook to force dismissal of update notices.
  • Additional documentation added.
  • Minor standards adjustments.

1.2.4

  • Updated CMB2 to 2.4.2.
  • Bumpted “tested up to” version.
  • Fixed a bug that occurred if no locations were selected.
  • Minor standards adjustments.

1.2.3

  • Added composer.json and composer.lock that were missing.
  • Updated CMB2 to 2.3
  • Translation files generated.
  • Language path and text domain added to plugin header.
  • Bumped compatible WP version.

1.2.2

  • Minor bugfixes.

1.2.1

  • Fixed issue that would cause some users to not see the modification slider.

1.2

  • Added conditional logic.
  • Multiple actions can now be performed.
  • Scripts are bundled and minified.
  • Changes to settings structure.
  • Miscellaneous bugfixes.

1.1.3

  • Readme updates.

1.1.2

  • Bugfixes.
  • Resolves potential fatal error mistakenly pushed to 1.1.

1.1.1

  • Bugfixes.

1.1

  • Rewritten from the ground up for future extensibility.
  • Performance enhancements.
  • Improved UI.
  • Better handling for late calls to the Heartbeat API.
  • New condition settings for filtering on the frontend.

1.0.2

  • Bumped tested version
  • Added donation button

1.0

  • Initial release.