
內容簡介
此外掛可協助 WordPress 使用者自動重啟 MySQL 服務,當服務遭遇任何未預期的流量、攻擊或資源不足而停止運作時。有許多待辦事項需要實現。在第一版釋出後,將會改進 MySQL 服務的監控腳本,並將 Linux cron 自動複製到預期的目錄下。此外掛已在 Apache2 伺服器上進行測試。
修復 WordPress 中「系統與資料庫連線錯誤」的問題。
如何使用此外掛程式模板
下載此外掛程式。
啟用外掛程式後,前往「設定」>「系統與資料庫連線錯誤監控外掛程式」。
選取您的網站停機監測間隔時間(例如每小時、每日等)。
請遵循此外掛程式設定頁面中的指示。
重要注意事項
此外掛程式包含我們如何在自己的外掛程序中實作外掛程式側邊欄和如我們自己的 Mailchimp 快訊訂閱之樣例小工具的範例。
您必須要知道如何修改這些藉以滿足自己的需求,否則需要完全移除。
對於如何在特定架構下進行修改的疑問,我們無法提供保證。
圖示由 Freepik 所製作,來自 www.flaticon.com。
祝使用愉快!
功能
此外掛程式模板中包含的範例技術
產生 MySQL 服務的監控腳本
監控腳本啟動 MySQL 服務後,將加入寄送有關網站停機的電子郵件通知(現在尚未加入)
使用類別方法建立外掛程式
透過重複使用類別級變數,最小化變數更新,例如,外掛程式名稱和 slug
使用共同的 WordPress 掛鈎和過濾器
在「設定」選單下建立管理介面選項
外掛標籤
開發者團隊
② 後台搜尋「Error Establishing DB Connection Monitor」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
This plugin helps WordPress users automatically restarts the mysql service when it is stopped by any unexpected traffic, attack or lack of resources in linux environment. There are lots of TODO for this plugin. After first release, the monitoring script for mysql service will be improved. The linux cron will be automatically copied to the expected directory. This plugin is tested with apache2 server.
Fix the Error Establishing a Database Connection in WordPress
How to Use this Plugin Template
Download this plugin.
After Plugin Activation GOTO Settings > Error Establishing DB Connection Monitor Plugin.
Select monitoring interval for your sites downtime(hourly, daily etc.)
Follow the instructions in the plugin’s settings page.
Important Notes
This plugin includes examples of how we implement a plugin sidebar in our own plugins and exmple widgets like our own mail-chimp newsletter subscription, etc.
You will have to either know how to modify these for your own needs or remove them completely.
We cannot promise support for specific questions about what to modify in your scenario.
Icon made by Freepik from www.flaticon.com
Enjoy!
Features
Example techniques included in this Plugin Template
Generating monitoring script for mysql service
After monitoring script starts the mysql service again TODO Emailing about downtime will be added.
Using a class approach to building a plugin
Minimal variable updates by re-using class level variables for things like the plugin name and slug
Using common WordPress hooks and filters
Creating an admin menu item under the Settings menu
