SuperAPI AI 工具集

maintain-wordpress

部署与运维

查看项目

更新于 10-15 22:14

技能介绍

用途:对 Hostinger 托管上的 WordPress 站点做检查、漏洞排查与更新维护,一次只处理一个站点。

主要能力:列出安装(wordpress_installations_list,可按 domain 过滤,ownership: "all" 含代管站点);检查核心版本及受影响漏洞、可用核心更新;列出已装插件与主题的状态、更新版本及 vulnerabilities[] 与 fixed_in;用 multi-execute 批量读取(每批最多 20 步,仅限同一服务器)。

使用方式:先读 search 返回的 inputSchema。检查用 wordpress_installations_show-core-version、list-core-updates、wordpress_plugins_list-installed、wordpress_themes_list-installed。报告时漏洞项优先,无修复或未启用的漏洞插件建议用 wordpress_plugins_uninstall 卸载,并询问要应用哪些更新。更新前提醒用户在 hPanel 备份或确认已有近期备份(API 无备份操作)。随后按批准执行:wordpress_plugins_update、wordpress_themes_update、wordpress_installations_update-core(补丁用 minor: true,主版本仅在用户要求时);忙碌站点可在维护期间用 wordpress_maintenance_toggle 开启,结束后务必关闭。更新、激活、卸载与核心变更均为排队任务,成功响应仅表示已排队,需每 10–20 秒轮询对应读取操作确认,不要重复提交写入。

每站更新后:wordpress_litespeed-cache_purge-lite-speed,用 curl -s -o /dev/null -w "%{http_code}\n" https://DOMAIN/ 与 /wp-login.php 验证返回 200 且正文无 PHP 错误,再执行 wordpress_installations_check-if-are-valid(force: true)。站点出错时停止,用 wordpress_plugins_deactivate 停用最后更新的插件并复查后报告。

其他:页面缓存与对象缓存状态、PHP 版本查询与更新(hosting_php_get 体积较大,约 25 KB)、wordpress_login_create-links 生成的一次性登录链接只交给用户,不得保存或复用;Hostinger 自家插件用 wordpress_plugins_update-hostinger。Agency Plan 站点需用 agency-hosting_websites_list-plan 获取,插件与主题只能在 wp-admin 更新,仅支持 wordpress 设置与核心版本变更。限制:无备份操作;批量操作不能跨服务器;is_valid 为 false 的安装应交给 troubleshoot-website 技能处理,不纳入更新。