تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

wp-to-static

بواسطة abhibavishi

Web & Frontend Development
698التنزيلات وفق ما يذكره clawskills.sh
3النجوم
0المشاهدات
لا إعجاباتسجّل الدخول للإعجاب بهذه المهارة
—لم يُقيَّم بعد
تقييمك

موجز

Convert a WordPress website to a static site and deploy to Cloudflare Pages.

الوصف

ما الذي تفعله هذه المهارة

Converts a live WordPress site to a static site and deploys it to Cloudflare Pages. Mirrors rendered HTML over SSH, then extracts only files actually referenced in HTML and CSS, reducing a 1.5GB+ install to roughly 25MB. Fixes URLs, self-hosts fonts, and strips WordPress-specific markup before deploying.

It extracts only referenced assets rather than copying the full WordPress install, keeping output small and ensuring no server-side code or credentials end up in the repository.

متى تستخدمها

  • Migrating a WordPress blog off shared hosting to cut monthly costs
  • Archiving a WordPress site before canceling the server
  • Eliminating WordPress attack surface after a security incident
  • Handing off a finished client site on Cloudflare Pages free tier
  • Converting a slow WordPress site to static for faster load times

مثال على سير العمل

الإدخال

User asks: convert https://example.com to a static site

الوكيل
  1. 1

    Validates all required environment variables and CLI tools (ssh, rsync, gh, wrangler)

  2. 2

    Tests SSH connection and locates the WordPress installation directory on the server

  3. 3

    Runs wget mirror on the server, then rsyncs only static assets to a local build directory

  4. 4

    Parses HTML and CSS to find referenced files, copies only those to ./public/, downloads and self-hosts Google Fonts

  5. 5

    Strips WordPress meta tags, creates Cloudflare _headers and _redirects files, pushes to a private GitHub repo, and deploys via wrangler pages deploy

الإخراج

Live Cloudflare Pages URL with all assets resolving correctly

المتطلبات

  • SSH access to the WordPress server with the private key loaded into ssh-agent
  • GitHub CLI (gh) authenticated via gh auth login
  • Cloudflare Wrangler CLI authenticated via wrangler login
  • Environment variables: WP_SSH_HOST, WP_SSH_USER, WP_SSH_PORT, WP_SSH_KEY, WP_SITE_URL, WP_SITE_NAME

التثبيت

clawhub install abhibavishi/wp-to-static

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط