maintain-wordpress
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMaintain WordPress
维护 WordPress
Check first, report, then update only what the user approves — one site at a time, proving each still loads before moving to the next.
先检查、报告,然后仅更新用户批准的内容——每次处理一个站点,并在继续处理下一个站点前验证当前站点仍可正常加载。
Calling the operations
调用操作
- Read the that
inputSchemareturns before the first call of each operation. If a name below is rejected as unknown,searchfor what the step does (e.g. "wordpress plugins update").search - Batch reads with (up to 20 steps a batch). Batches chain operations from one server only — the Hostinger Connector runs
multi-execute,wordpressandhostingas separate servers.agency-hosting - Updates, activations, uninstalls and core changes are queued jobs: a success response means "queued". Poll the matching read operation every 10–20 s until the change shows; never re-send the write.
- 首次调用每项操作前,读取 返回的
search。如果下面某个名称被判定为未知,请通过inputSchema查找该步骤执行的操作(例如 "wordpress plugins update")。search - 使用 批量执行读取操作(每批最多 20 个步骤)。一个批次只能串联来自同一服务器的操作——Hostinger Connector 将
multi-execute、wordpress和hosting作为独立服务器运行。agency-hosting - 更新、启用、卸载和 core 变更都是队列任务:成功响应表示“已排队”。每 10–20 秒轮询对应的读取操作,直到变更显示出来;切勿重复发送写操作。
1. Find the installs
1. 查找安装
- One site: with
wordpress_installations_list(substring match — take the exact entry). Every site:domainwithout filters, addingwordpress_installations_listto include sites the user manages for others.ownership: "all" - Keep (the
idparameter of everysoftwarecall),wordpress_*,username,domain,directoryandis_valid.validation_error - Agency Plan WordPress sites come from with
agency-hosting_websites_list-plan. Whenwebsite_types: ["wordpress"]does not include them, onlywordpress_installations_listand core version changes (agency-hosting_wordpress_settings,agency-hosting_wordpress_list-versions) are available; plugins and themes are updated from wp-admin.agency-hosting_wordpress_change-version
- 单个站点:使用 调用
domain(子字符串匹配——选择精确匹配的条目)。所有站点:调用wordpress_installations_list且不使用过滤器,并添加wordpress_installations_list以包含用户为他人管理的站点。ownership: "all" - 保留 (每个
id调用的wordpress_*参数)、software、username、domain、directory和is_valid。validation_error - Agency Plan 的 WordPress 站点来自 ,并设置
agency-hosting_websites_list-plan。如果website_types: ["wordpress"]未包含这些站点,则只能使用wordpress_installations_list和 core 版本变更(agency-hosting_wordpress_settings、agency-hosting_wordpress_list-versions);plugins 和 themes 需要从 wp-admin 更新。agency-hosting_wordpress_change-version
2. Check (read-only)
2. 检查(只读)
Per install:
- — core version and the known vulnerabilities that affect it.
wordpress_installations_show-core-version - — available core versions.
wordpress_installations_list-core-updates - —
wordpress_plugins_list-installed,status(the newer version, when there is one) andupdatewithvulnerabilities[].fixed_in - — the same for themes.
wordpress_themes_list-installed
Four steps per install fit five installs in one batch. For an install with , run with for a fresh reason and leave it out of updates — a broken install is the skill's job.
is_valid: falsewordpress_installations_check-if-are-validforce: truetroubleshoot-website每个安装:
- ——core 版本及影响该版本的已知漏洞。
wordpress_installations_show-core-version - ——可用的 core 版本。
wordpress_installations_list-core-updates - ——
wordpress_plugins_list-installed、status(存在新版本时的版本号)以及包含update的fixed_in。vulnerabilities[] - ——themes 的相同信息。
wordpress_themes_list-installed
每个安装有四个步骤,因此一个批次最多可检查五个安装。如果某个安装的 ,使用 调用 以获取最新原因,并将其排除在更新之外——损坏安装由 skill 负责处理。
is_valid: falseforce: truewordpress_installations_check-if-are-validtroubleshoot-website3. Report before changing anything
3. 变更前先报告
undefinedundefinedexample.com (WordPress 6.8.1)
example.com(WordPress 6.8.1)
Vulnerable: contact-form-x 5.2 → fixed in 5.3 (update available)
Vulnerable, inactive: old-slider 1.0 — no fix; uninstall recommended
Updates: core 6.8.1 → 6.8.3 (minor), 4 plugins, 1 theme
Vulnerable items come first. A vulnerable plugin without a fix, or an inactive one, is better removed with `wordpress_plugins_uninstall` than left installed — inactive code on disk can still be reached. Ask which updates to apply.存在漏洞:contact-form-x 5.2 → 已在 5.3 修复(有可用更新)
存在漏洞、未启用:old-slider 1.0 — 无可用修复;建议卸载
更新:core 6.8.1 → 6.8.3(次要版本)、4 个 plugins、1 个 theme
先列出存在漏洞的项目。对于没有修复版本的漏洞 plugin,或未启用的 plugin,最好使用 `wordpress_plugins_uninstall` 将其卸载,而不是继续保留在安装中——磁盘上未启用的代码仍可能被访问。询问用户要应用哪些更新。4. Back up first
4. 先备份
The API has no backup operation. Before updating, ask the user to create a backup in hPanel or confirm the latest automatic one is recent enough. Say it plainly; the user may choose to go ahead without one.
API 没有提供备份操作。更新前,请用户在 hPanel 中创建备份,或确认最近的自动备份足够新。明确告知用户这一情况;用户可以选择不备份并继续。
5. Update, one site at a time
5. 每次更新一个站点
- Plugins that fix a vulnerability — with their slugs.
wordpress_plugins_update - The remaining approved plugins, then themes with .
wordpress_themes_update - Core with :
wordpress_installations_update-corefor patch releases; a majorminor: trueonly when the user asks for it.version
For a busy site the user may want with during the run — and it is always turned off again afterwards, even when something failed.
wordpress_maintenance_toggleenabled: trueAfter each site:
- .
wordpress_litespeed-cache_purge-lite-speed - and the same for
curl -s -o /dev/null -w "%{http_code}\n" https://DOMAIN/— both should behttps://DOMAIN/wp-login.phpwith no PHP error in the body.200 - with
wordpress_installations_check-if-are-valid.force: true
When a site breaks: stop the run, deactivate the plugin updated last with , check again, and report which update caused it before touching any other site.
wordpress_plugins_deactivate- 更新可修复漏洞的 plugins——使用 并传入相应的 slugs。
wordpress_plugins_update - 更新其余获批的 plugins,然后使用 更新 themes。
wordpress_themes_update - 使用 更新 core:补丁版本使用
wordpress_installations_update-core;仅当用户明确要求时才通过minor: true更新主要版本。version
对于流量繁忙的站点,用户可能希望在执行期间调用 并设置 ——之后必须始终将其关闭,即使某一步失败也一样。
wordpress_maintenance_toggleenabled: true每个站点处理完成后:
- 调用 。
wordpress_litespeed-cache_purge-lite-speed - 执行 ,并对
curl -s -o /dev/null -w "%{http_code}\n" https://DOMAIN/执行相同操作——两者都应返回https://DOMAIN/wp-login.php,且正文中没有 PHP 错误。200 - 调用 并设置
wordpress_installations_check-if-are-valid。force: true
如果站点发生故障:停止运行,使用 停用最后更新的 plugin,再次检查,并在处理其他站点之前报告是哪个更新导致了故障。
wordpress_plugins_deactivate6. Performance and access
6. 性能和访问
- Page cache: ; purge after design or content changes.
wordpress_litespeed-cache_show-lite-speed-status - Object cache: , then
wordpress_object-cache_show-memcached-statuswithwordpress_object-cache_toggle-memcached— the usual quick speed-up.enabled: true - PHP version: is large (around 25 KB), so read it only when the user asks about PHP. PHP 8.x is markedly faster than 7.x; confirm plugin compatibility before
hosting_php_get.hosting_php_update-version - wp-admin: returns temporary one-click login links. Give them to the user only; never store or reuse them.
wordpress_login_create-links - Hostinger's own plugins update with (
wordpress_plugins_update-hostinger).slug
- 页面缓存:;在设计或内容变更后清除缓存。
wordpress_litespeed-cache_show-lite-speed-status - 对象缓存:先调用 ,再调用
wordpress_object-cache_show-memcached-status并设置wordpress_object-cache_toggle-memcached——这是常用的快速加速方式。enabled: true - PHP 版本:返回的内容较大(约 25 KB),因此仅在用户询问 PHP 时读取。PHP 8.x 明显快于 7.x;执行
hosting_php_get前确认 plugin 兼容性。hosting_php_update-version - wp-admin:返回临时的一键式登录链接。仅将其提供给用户;绝不存储或重复使用。
wordpress_login_create-links - Hostinger 自有 plugins 使用 (
wordpress_plugins_update-hostinger)更新。slug
Many sites
多个站点
Tell the user how many installs there are before starting. Check in batches, keep one running report, and update site by site so a failure stops the run with the rest untouched.
开始前告知用户共有多少个安装。分批检查,持续维护一份运行报告,并逐个站点更新,这样一旦失败就会停止运行,而其他站点不受影响。