About this plugin
Static Cache Wrangler – Headless Assistant is a companion plugin for Static Cache Wrangler that converts cached HTML files into headless CMS-compatible formats for modern headless CMS workflows. g. sed, grep, awk, sort) and a willingness to explore the WordPress command-line interface.
This plugin enables composable, command-line interface tooling and IS NOT a point and click solution.
Testing Results
com (15-page WordPress site):
- ☑ 74% semantic conversion rate – 564 blocks converted to structured content
- ☑ 15 pages converted successfully to Sanity format
- ☑ 763 links preserved with proper structure and references
- ☑ 36 images tracked with migration metadata
- ☑ 14 accordions converted semantically
- ☑ 13 tables converted semantically
Top Conversion Rates Achieved:
* Simple pages: 86% semantic conversion
* Complex pages with mixed content: 74-82%
* Ultimate test page (141 blocks, 23 different Kadence block types): 52%
What Falls Back to HTML (requires custom hooks):
* Navigation menus (by design – preserves styling)
)
* Premium block libraries (Otter, Spectra – requires additional detectors)
Extensible Architecture
Unlike hardcoded solutions, this plugin uses a pluggable engine system where CMS targets can be registered via filters. Ships with Sanity® CMS support (unofficial) out of the box. It is technically feasible to target Contentful, Strapi, and others via extensions.
io. io.
Features
Direct Sanity CMS Conversion:
* WordPress → Sanity NDJSON export
* Pattern detection for Gutenberg blocks
* Schema generation for Sanity Studio
* Asset tracking and manifest
* Command: wp scw-headless convert --cms=sanity
Smart Pattern Detection:
* 12 core Gutenberg patterns
* 28 Kadence Blocks patterns
* XPath-based detection with confidence scoring
* Priority-based matching for nested structures
* Pattern inheritance system
CLI-First Experience:
* wp scw-headless scan – View cached files
* wp scw-headless analyze <file> – Detect patterns
* wp scw-headless convert --cms=sanity – Export to Sanity
* wp scw-headless patterns – List registered patterns
* wp scw-headless detectors – Show detector modules
* wp scw-headless targets – List available CMS platforms
* wp scw-headless info – Show plugin statistics
Future Roadmap Considerations
Generic Portable Text Output:
* CMS-agnostic JSON format
* Support for any Portable Text consumer
* Command: wp scw-headless normalize
* Non-WP analyzer and converter tooling
Advanced Pattern Detection:
* 40+ patterns including Kadence Blocks
* ACF field support (roadmap)
* Page builder compatibility (roadmap)
* Custom pattern registration
Multi-CMS Support:
* Sanity (today)
* Strapi (horizon)
* Contentful (horizon)
* Payload CMS (horizon)
* Any Portable Text consumer (roadmap)
Learn more about planned features features
Funding Model
* This plugin is 100% free (true WordPress style)
* Want to make a donation? Consider purchasing a copy of the author’s book on command-line interfaces for yourself or as a gift.
Modern CLI Book
Pattern Detection System
Built-in Detector Modules:
Gutenberg Core – 12 patterns:
* heading, paragraph, image, gallery, video
* list (ordered/unordered), quote, code
* button, buttons, separator, table
Kadence Blocks – 28 patterns:
* accordion, tabs, advanced_button, progress_bar
* icon_list, infobox, countdown, rowlayout
* column, advanced_heading, form, testimonials
* posts, table_of_contents, google_maps, lottie
* image, video_popup, advanced_gallery, navigation
* icon, spacer, show_more, search, identity
* table, vector, countup
Extensible via Filters:
php
// Register custom patterns
add_action('stcw_headless_patterns_loaded', function() {
\STCW\Headless\Engine\Detector\PatternRegistry::register('custom_block', [
my-custom-block'],
'extractor' => [MyExtractor::class, 'extract'],
'priority' => 8,
95,
]);
});
How It Works
- Cache your WordPress site with Static Cache Wrangler
- Scan cached files: wp scw-headless scan
- Analyze patterns: wp scw-headless analyze /page/
- Convert:
- Free: wp scw-headless convert --cms=sanity
Supported CMS Targets
Included:
* Sanity CMS – Full Portable Text conversion with schema generation
Perfect For
- Migrating WordPress content to headless CMS platforms
- JAMstack architecture with WordPress as authoring tool
- SEO component analysis
- UI pattern analysis
Requirements
- WordPress 6.0 or higher
- PHP 7.4+ (PHP 8.x fully supported)
- Static Cache Wrangler 2.0.5+ (must be installed and active)
- WP-CLI recommended for best experience
- Pattern Library Pro for enterprise features (optional)
Pattern Analysis
html (104 KB)
Patterns Found: 71
00
00
00
90
95
…
Confidence Distribution:
95): 60
85+): 11
85): 0
`
How do I get support?
- Free users: GitHub Issues
- Documentation: wp2headless.com/docs
Why are some files showing as 140 B?
Static Cache Wrangler may create gzipped files or use compression. html files within cached directories.
Additional Information
Architecture
Engine Components:
* Scanner – Finds cached HTML files
* Normalizer – Cleans HTML while preserving structure
* Pattern Registry – Centralized pattern definitions with inheritance
* Pattern Detector – XPath-based pattern matching engine
* Extractors – DOM-to-data conversion functions
* Parser – Orchestrates normalization → detection → extraction
* Converter – Transforms to target CMS format
* Target Registry – Pluggable CMS target management
Data Flow:
Cached HTML → Normalizer → Pattern Detector → Extractors → Converter → Export
Support
- Documentation: https://wp2headless.com/documentation/
- GitHub: https://github.com/derickschaefer/stcw-headless-assistant
- Issues: https://github.com/derickschaefer/stcw-headless-assistant/issues
Roadmap
0 (Q1 2026) – Quality Focus
* Improve semantic conversion to 85%+ (currently 74%)
* Wire up remaining Kadence extractors (button, icon list, maps)
* Enhance navigation menu handling
* Add pattern detection validators
* 80%+ test coverage
0 (Q2 2026) – More Patterns
* Elementor widgets detection
* Beaver Builder modules
* ACF field mapping
* Custom post type support
0 (Q3 2026) – Multi-CMS
* TBD based on input, feedback, and demand
Contributing
Contributions welcome!
* Additional CMS target implementations
* Page builder detector modules
* Pattern extraction improvements
* Documentation and examples
* Test coverage
Contribution Guidelines
Privacy Policy
This plugin does not collect, store, or transmit any user data. All conversion happens locally on your WordPress installation.
Data Storage:
* No external API calls
* No analytics or tracking
* No cookies used
* Export files stored locally in WordPress wp-content/cache/ directory
License
GPL v2 or later – Copyright © 2025-2026 Derick Schaefer
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Third-Party Trademark Notices
Content Management Systems:
io
Contentful® is a registered trademark of Contentful GmbH
Strapi® is a registered trademark of Strapi Solutions SAS
io, Inc.
DatoCMS® is a registered trademark of Dato srl
Payload CMS® is a registered trademark of Payload CMS, Inc.
WordPress Ecosystem:
WordPress® and Gutenberg® are registered trademarks of the WordPress Foundation
WP-CLI® is a registered trademark of the WordPress Foundation
Kadence® and Kadence Blocks™ are trademarks of Kadence WP LLC
Elementor® is a registered trademark of Elementor Ltd.
Divi® is a registered trademark of Elegant Themes, Inc.
Advanced Custom Fields® (ACF) is a registered trademark of WP Engine, Inc.
WooCommerce® is a registered trademark of Automattic Inc.
Beaver Builder® is a registered trademark of Beaver Builder
Development Tools:
GitHub® is a registered trademark of GitHub, Inc.
org
Content & Media:
YouTube® is a registered trademark of Google LLC
Lottie™ is a trademark of Airbnb, Inc.
Google Maps™ is a trademark of Google LLC
Project Attribution:
com is owned by Derick Schaefer
Static Cache Wrangler is developed by Derick Schaefer
Disclaimer:
This plugin is not affiliated with, endorsed by, or sponsored by any of the trademark owners listed above. These names are referenced solely to describe compatibility, integration capabilities, or as examples of headless CMS platforms that may be used with exported content. The plugin has not been tested, approved, or certified by any of these companies or organizations.