
基于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.