[WordPress] 外掛分享: WP-ServerInfo

首頁外掛目錄 › WP-ServerInfo
WordPress 外掛 WP-ServerInfo 的封面圖片
10,000+
安裝啟用
★★★★
4.8/5 分(17 則評價)
38 天前
最後更新
問題解決
WordPress 6.8+ PHP 8.2+ v3.0.0 上架:2007-01-20

內容簡介

WP-ServerInfo 外掛提供即時的伺服器資訊報告,包括作業系統、網頁伺服器、PHP 版本及其限制、MySQL 版本等,讓使用者能夠輕鬆了解主機的運行狀態。

【主要功能】
• 控制台上的伺服器資訊小工具
• 詳細報告分為五個標籤
• 實時讀取主機數據,無需設定
• 支援 memcached 和 Redis 伺服器統計
• 本地化的大小和計數格式

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP-ServerInfo」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WP-ServerInfo reports what your host is actually giving you: the operating system and web server, the PHP version and every one of its limits, the MySQL version and its variables, and the statistics of your memcached and Redis servers if you run them.
There is nothing to configure and no settings screen. Every figure is read live from the host each time you open the page, so there is nothing stored, nothing to keep in step and nothing that can go stale.
Features

A Server Information widget on your Dashboard with the figures you look up most often
A full report at Tools -> WP-ServerInfo, in five tabs

General — OS, web server, hostname, IP and port, document root, server date and load, and the headline PHP and MySQL numbers side by side
PHP — version, Zend Engine, SAPI, loaded configuration file, loaded extensions, and every php.ini directive with its local and master value
MySQL — version and every server variable
memcached — the full statistics set, each row explained, when the Memcached or Memcache extension is installed
Redis — version, uptime, memory, clients, hit ratio and eviction figures, when the phpredis extension is installed

Sizes and counts formatted in your own locale, and memory_limit = -1 reported as Unlimited rather than as a number

Donations
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
Usage
Activate the plugin and you are done.
The Server Information widget appears on your Dashboard, and the full report is at Tools -> WP-ServerInfo. Both require the manage_options capability, because between them they report your document root, your server’s IP address and your whole PHP and MySQL configuration.
The memcached and Redis tabs
Each tab appears only when the matching PHP extension is loaded, and by default each reports on the server running on this machine — localhost:11211 for memcached, 127.0.0.1:6379 for Redis. If your cache lives somewhere else, point the plugin at it from your theme’s functions.php or a small must-use plugin:
add_filter(
'wp_serverinfo_redis_server',
function ( $server ) {
$server['host'] = 'redis.internal';
$server['port'] = 6379;
$server['timeout'] = 1;

return $server;
}
);

wp_serverinfo_memcached_server takes the same shape, with `host` and `port`. Either filter may return only the keys it wants to change; the rest keep their defaults. A `unix://` socket path works as the Redis `host`, with `port` set to `0`.

Handing the screens to somebody else
Every capability check goes through one filter, so a site that wants a non-administrator to see the report changes it in one place:
add_filter(
'wp_serverinfo_capability',
function ( $capability, $context ) {
return 'report' === $context ? 'edit_pages' : $capability;
},
10,
2
);

$context is `report` for the Tools screen and `widget` for the Dashboard widget, so the two can be answered differently.

延伸相關外掛

文章
Filter
Mastodon