
基於WordPress搭建嘅生產級旅遊網誌,使用Docker與Traefik容器化,具備透過AWS SigV4實現嘅直接Cloudflare R2媒體卸載,以及用於AI遠程內容與SEO管理嘅自主Cloudflare Worker MCP伺服器。
Key architectural decisions, concrete code implementations, and performance wins behind this project.
Offloading WordPress media to S3-compatible Cloudflare R2 storage without relying on heavy paid plugins or proxying large binary uploads through an intermediate Cloudflare Worker.
Built a custom `mu-plugin` (`r2-offload.php`) implementing AWS Signature Version 4 HMAC-SHA256 signing natively in PHP. Hooked into `wp_handle_upload` and `wp_generate_attachment_metadata` to offload original uploads and thumbnails directly to R2, with automatic fallback to local disk if an upload fails.
Enabling AI agents (Claude Code / claude.ai) to inspect site health, modify posts, manage Rank Math SEO meta, and upload R2 assets securely without exposing WordPress admin credentials or full database access.
Built a TypeScript Model Context Protocol (MCP) server deployed on Cloudflare Workers using OAuth 2.0 PKCE. Designed targeted tools for Rank Math SEO, WP REST API, and native Cloudflare R2 bucket bindings with rate limiting and error boundaries.
// community_discussion
Have thoughts, questions, or ideas regarding this system's architecture? Leave a comment below with your GitHub account.