Communitygithub.com

umairmsm/wp-operate

WordPressサイト運用のステージ8:バックアップ、復元訓練、災害復旧、認証情報管理、更新ポリシー、マルチマシン運用を自動化します。

wp-operate とは?

このスキルは、WordPressサイトの運用段階(ステージ8)に焦点を当て、サイトがラップトップ紛失、サーバーダウン、更新失敗、マシン変更などに耐えられるようにするためのものです。定期的なバックアップ(DB、アップロード、Gitブランチ、Claudeメモリを含む)を暗号化してオフマシンに保存し、四半期ごとの復元訓練、認証情報台帳の管理、プラグイン更新のステージング環境でのテスト、複数マシン間での作業を可能にするブリッジファイルや状態バンドルなどの仕組みを提供します。`scripts/backup.sh`、`scripts/workstation-doctor.sh`、`scripts/make-state-bundle.sh`などのスクリプトが含まれ、Claude Code、Cursor、CodexなどのAIエージェントツールと連携して動作します。

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

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ステージ8:運用

目標:ラップトップ紛失、サーバーダウン、不正なアップデート、マシン変更があってもサイトが生き残り、誰も手順を覚えている必要がない。

手順

  1. バックアップ
    • scripts/backup.sh を毎週、およびリスクのある作業の前に実行します。これにより、データベース、アップロード、すべてのGitブランチとスタッシュ、およびClaudeメモリがパッケージ化されます。
    • zipがマシンから出る前に --encrypt を使用し、コピーを1つオフマシンに保持します。
    • ライブ環境:ホストの日次バックアップに加え、デプロイスクリプトとコンテンツスクリプトが取得するダンプ。
  2. すべてのデータの保存場所を文書化 する:プロジェクトの docs/reference/DISASTER_RECOVERY.md のセクション0に記述します。写真のオリジナルフォルダを含めます(Git管理外)。
  3. 復元訓練:四半期に一度、予備のマシンまたは新しいDDEVプロジェクトに復元し、時間を計測し、§5に記録します。復元したことのないバックアップは希望であって、バックアップではありません。
  4. 認証情報:すべてのシークレットは CREDENTIALS_INVENTORY.md に1行として記載します(名称、保存場所、保持者、最終ローテーション日)。AIエージェントが参照したものはローテーションします。
  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経由で使用してそれらを引き出す。
  • あるOSで作成したビジュアルベースラインが別のOSでは機能しない。それらは固定のDockerイメージに保持する。
  • 期限のある無料プランやクレジットは、脱出訓練の期限である:期限の1週間前に、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.

関連スキル