MainWP Monitoring Notify WP Registry grade D+. High-severity findings · 3 findingsWP RegistryHigh-severity findings · 3 findingsOpen the reportD+
The MainWP Monitoring Notify extension allows you to send notifications via Line Notify when your site goes offline.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/j7-dev/mainwp-monitoring-notify/releases/download/v1.3.0/mainwp-monitoring-notify.zipMainWP Monitoring Notify | 讓 MainWP 監控更及時 :
一句話講完 MainWP Monitoring Notify :
MainWP Monitoring Notify 是一個 WordPress 套件,依賴 MainWP 來監控網站運作狀態,並透過 LINE Notify 來通知你。
預覽
⚡ 主要功能
使用 LINE NOTIFY 通知
如果你覺得通知太頻繁,可以設定,只有網站斷線時才通知
1. 如何申請 LINE Notify Token
1-1. 請先前往 LINE Notify 並登入你的 LINE
1-2. 點擊 Generate token 然後選擇想要通知的聊天室
1-3. 複製 token 然後貼到這邊保存
1-4. 最後,邀請 LINE Notify 到你第二步選擇的聊天室就完成了🎉🎉🎉
2. 常見 Q & A
2-1. 多久檢查一次?
看你
Sites > Monitoring,中的設置是多久,最短可以 每 5 分鐘 檢查一次
2-2. 運作原理是什麼?
是使用
WP CRON搭配MainWP本身的hook做成⚠️
WP CRON必須是 有人造訪網站時才會觸發,如果您的網站流量本身並不高,推薦使用 主機本身提供的crontab來實現,詳細可參考 官方文章 或 這篇文章也因為如此,斷線的檢查推波通知 並非準確的 5 分鐘
2-3. [進階] 設定準確的定時任務 - 使用 crontab
如果你的主機商允許你設定
crontab那麼,你可以透過crontab實現準確的定時任務,也可以參考此crontab教學
2-3-1. 取消這個外掛的
WP CRON在你主題底下的
functions.php輸入
add_filter( 'mainwp_monitoring_notify_wp_cron_enabled' , '__return_false', 100, 1 );
2-3-2. ssh 伺服器後輸入
crontab -e,開啟crontab設定⚠️ 請確保你的伺服器上可以執行 php 指令
⚠️ 下方的
{{PATH}}請自行替換此網站的檔案路徑,例:/var/www/html/MY_SITE例: 每分鐘執行一次:
* * * * * php {{PATH}}/wp-content/plugins/mainwp-monitoring-notify/cron/exec.php > /dev/null 2>&1例: 每 5 分鐘執行一次:
*/5 * * * * php {{PATH}}/wp-content/plugins/mainwp-monitoring-notify/cron/exec.php > /dev/null 2>&1
Releases
6 releases. Each count is every asset in that release; expand a row for the breakdown.
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.