WordPress to Static Site Migration for Openclaw

A specialized migration tool that converts dynamic WordPress installations into optimized, secure static sites for Cloudflare Pages deployment.

abhibavishi
v1.2.0
Feb 12, 2026
5
1.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install wp-to-static

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install wp-to-static using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is WordPress to Static Site Migration?

The wp-to-static skill is designed for developers looking to eliminate the maintenance overhead and security risks of WordPress. By utilizing Openclaw Skills, this tool performs a deep mirror of rendered HTML via SSH, intelligently identifying only the assets actually used on the frontend. This process can shrink a bulky 1.5GB site down to roughly 25MB by discarding unused themes, plugins, and server-side code.

This workflow ensures a zero-attack surface by removing PHP entirely, resulting in instant load times and zero hosting costs. The skill handles the entire lifecycle from server-side mirroring to local optimization and final deployment to Cloudflare Pages via GitHub.

WordPress to Static Site Migration Use Cases

  • Migrating active WordPress blogs to high-performance static hosting to save on costs.
  • Securing legacy websites by removing the PHP execution engine and database dependencies.
  • Optimizing site performance by self-hosting fonts and stripping WordPress-specific metadata.
  • Automating the deployment pipeline from a staging WordPress server to a production static environment.

How WordPress to Static Site Migration Works

  1. Performs a pre-flight check of local environment variables and required binaries like gh, wrangler, and rsync.
  2. Connects to the remote server via SSH to locate the WordPress root and configuration files.
  3. Executes a server-side mirror command using wget to generate a clean HTML representation of the site.
  4. Synchronizes only essential static assets to a local build directory, strictly excluding all PHP and sensitive configuration files.
  5. Parses all HTML and CSS files to build a manifest of referenced assets, ensuring only used files are included in the final bundle.
  6. Rewrites absolute URLs to relative paths, downloads and self-hosts Google Fonts, and removes WordPress generator tags.
  7. Configures Cloudflare-specific headers and redirects for optimized caching and security.
  8. Initializes a private GitHub repository and deploys the final public directory to Cloudflare Pages.

WordPress to Static Site Migration Setup

To get started with this skill within the Openclaw Skills ecosystem, ensure your environment is configured:

# Authenticate with GitHub and Cloudflare
gh auth login
wrangler login

# Set required environment variables
export WP_SSH_HOST="your.server.com"
export WP_SSH_USER="username"
export WP_SSH_PORT="22"
export WP_SSH_KEY="~/.ssh/id_rsa"
export WP_SITE_URL="https://example.com"
export WP_SITE_NAME="my-static-site"

# Add your key to the agent
eval "$(ssh-agent -s)"
ssh-add $WP_SSH_KEY

WordPress to Static Site Migration Data Schema & Taxonomy

The skill organizes data into a structured build pipeline to prevent accidental exposure of server-side files:

Path Description Retention
./build/site/ Raw mirrored content from the server Deleted before git commit
./public/ Final optimized static site Committed to Git
./public/fonts/ Localized web fonts Committed to Git
./public/_headers Cloudflare caching and security headers Committed to Git
./public/_redirects Static routing and legacy path handling Committed to Git

WordPress to Static Site Migration Advanced Features

  • Intelligent dependency resolution that identifies assets referenced in CSS url() tags and HTML srcset attributes.
  • Automated "WordPress Cruft" removal, including oEmbed links, generator tags, and W3 Total Cache comments.
  • Forced exclusion of sensitive files like .env, wp-config.php, and SQL dumps during the rsync process.
  • Integrated local verification server to audit the static site before pushing to production.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins sshssh-agentrsynccurlgitghwrangler
Github Stars: 0
forks: 0

Featured*