Communitygithub.com

umairmsm/wp-operate

WordPress 站点运营第八阶段:包含备份、灾难恢复演练、凭据清单、更新策略、告警及多机协作,适用于“备份”“恢复”“迁移机器/服务器”“更新插件”“服务器故障”“云端工作”“设置第二台机器”等场景。

wp-operate 是什么?

该技能是 wp-site-kit WordPress 构建流程的第八阶段,专注于站点上线后的日常运营与灾难恢复。它提供了完整的备份方案(包括数据库、上传文件、所有 Git 分支和暂存区、以及 Claude 记忆),支持加密和离机副本保存。技能要求每季度进行一次恢复演练,并将结果记录在案,以验证备份的有效性。它还管理凭据清单(CREDENTIALS_INVENTORY.md)、运营例程(每周/月/年检查、更新策略和告警),并支持多机协作:通过 BRIDGE.md 明确角色和交接日志、workstation-doctor.sh 检查环境一致性、make-state-bundle.sh 加密打包 Git 忽略的配置。该技能适用于 Cursor、Claude Code 等 AI 代理开发者工具,帮助用户应对服务器故障、机器更换、插件更新等场景,确保站点在丢失笔记本、服务器宕机、更新失败后仍能快速恢复。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/umairmsm/wp-site-kit/tree/HEAD/skills/wp-operate

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

第8阶段:运营

目标:站点在丢失笔记本、服务器宕机、更新失败或更换机器后仍能存活,并且没有人需要记住操作步骤。

步骤

  1. 备份。
    • 每周运行 scripts/backup.sh,并在执行风险操作前运行。它会打包数据库、上传文件、每个 Git 分支和暂存区,以及 Claude 记忆。
    • 在 zip 文件离开机器前使用 --encrypt 参数,并在机器外保留一份副本。
    • 实时备份:主机的每日备份,加上部署脚本和内容脚本生成的转储。
  2. 记录所有文件的存放位置 到项目的 docs/reference/DISASTER_RECOVERY.md 第0节中。包括原始照片文件夹:它不在 git 中。
  3. 恢复演练。 每季度在备用机器或新的 DDEV 项目上执行一次恢复,记录耗时,并在 §5 中记录。从未恢复过的备份只是希望,不是真正的备份。
  4. 凭据: 每个密码在 CREDENTIALS_INVENTORY.md 中有一行(名称、存放位置、谁拥有它、最近轮换时间)。任何被代理看到过的凭据都需要轮换。
  5. 例程: 每周、每月和每年检查,更新策略和告警,记录在 docs/reference/OPERATIONS.md 中。插件更新先到暂存环境。
  6. 多台机器? 请遵循 references/multi-machine.md:
    • docs/team/BRIDGE.md 记录角色、规则和交接日志;
    • scripts/workstation-doctor.sh 检查环境一致性;
    • scripts/make-state-bundle.sh 加密打包被 git 忽略的配置。

关口(在 SITE_STATUS.md 中勾选)

  • 备份已安排,并有离机副本
  • 恢复演练已完成(日期、耗时)
  • 更新和告警例程已写入 OPERATIONS.md

经验教训

  • 备份脚本曾经指向错误的 Claude 记忆文件夹。会话从父文件夹运行,因此记忆存放在不同的路径下。脚本会推导路径,但为此情况接受 CLAUDE_MEM= 参数。
  • 云构建机上有一个分支和暂存区,其他地方不存在,且该机器无法推送。在机器停止或被删除之前,使用 git bundle 通过 ssh 将它们拉取出来。
  • 在一个操作系统上创建的视觉基线在另一个操作系统上会失败。将它们保留在固定的 Docker 镜像中。
  • 免费计划或信用额度到期日期是出口演练的截止日期:到期前一周,证明你可以从 git + 状态包 + 备份在下一台机器上重建。

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

umairmsm/wp-build

Stage 3 of a wp-site-kit WordPress build - local DDEV site, the core must-use plugin (modules), the presentation-only child theme with skins, the content model (custom post types, meta, WP_Query, render functions), and the enquiry pipeline that saves leads before forwarding. Use when building or changing features, templates, content types, forms or plugin modules on a wp-site-kit site.

umairmsm/wp-content

Stage 4 of a wp-site-kit WordPress build - real copy and photos. Content truth (facts only from the owner), AI drafts and owner approval, claims audits, banned words and fake proof, legal pages, the photo pipeline (dedupe, real-only, EXIF strip, WebP sizes, alt text, AI image register), and recorded content changes. Use for "write the copy", "add photos", "the owner sent new photos", "check for duplicates", "update prices or text on the live site", "legal pages".

umairmsm/wp-design

Stage 2 of a wp-site-kit WordPress build - design direction, a static HTML/CSS prototype with design tokens, owner sign-off with screenshots, self-hosted fonts, and porting the approved look into a swappable WordPress skin. Use for "design the site", "new look", "redesign", "change colours or fonts", "make a new skin", "port the prototype to WordPress".

umairmsm/wp-kickoff

Stage 1 of a wp-site-kit WordPress build. Use when starting a new WordPress website or taking over or rebuilding an existing one - discovery brief, stack decision, creating the project with bin/wp-site-new, locked decisions, private repo and credentials inventory. Triggers - "new WordPress site", "start a client website", "rebuild this site", "take over this WordPress site".

umairmsm/wp-seo

Stage 5 of a wp-site-kit WordPress build - titles and descriptions, canonical URLs, one schema owner and JSON-LD, sitemaps, robots.txt and llms.txt, AI crawler access, redirects (301 vs 302), legacy URL maps, Search Console, and adding languages one pilot at a time with Polylang (hreflang, .po/.mo strings, native review). Use for "SEO", "schema", "redirect", "old URLs", "translate the site", "add French/Spanish", "hreflang", "canonical".

umairmsm/wp-ship

Stage 7 of a wp-site-kit WordPress build - staging behind Cloudflare Access, server hardening, safe deploys from a commit (scripts/deploy-safe.sh), database content changes, the launch audit, DNS cutover without breaking a running business, and the first week after launch. Use for "deploy", "set up staging", "go live", "launch", "cutover", "move DNS", "harden the server".

umairmsm/wp-site

Start here for any WordPress website built with wp-site-kit, from an empty folder to a live site. Use when someone says "build a WordPress site", "new website for a client", "where are we on the site", "what is next before launch", or asks to continue a site project. Finds the current stage from SITE_STATUS.md, applies the hard rules, and hands over to the right stage skill.

相关技能