Linux 软件免费装
Banner图

Static Cache Wrangler

开发者 derickschaefer
更新时间 2025年11月12日 11:33
PHP版本: 7.4 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

cache static site static site generator html export static site export

下载

2.0.6

详情介绍:

Static Cache Wrangler is a lightweight, low‑resource static site generator and HTML export engine for WordPress. It automatically creates self‑contained, URL‑agnostic static pages of your site — perfect for anyone who needs to preserve, distribute, or accelerate WordPress content. Originally developed as a command‑line tool for WP‑CLI, it has evolved into composable, zero‑impact tooling that supports administrators, developers, and site owners alike. Whether you're archiving a client project, deploying to a CDN, or creating a portable offline version that runs anywhere, Static Cache Wrangler delivers fast, CDN‑ready HTML output without complex setup. Technically, the plugin uses an asynchronous, lazy‑loading build mechanism that generates static pages as visitors browse your site. Over time, your entire site is exported as lightweight static HTML.\ An upcoming free companion plugin will add real‑time build monitoring and manually triggered full‑site generation for any uncached pages. Unlike traditional static‑site plugins that require full crawls or database schema changes, Static Cache Wrangler is zero‑impact: Detailed Testing and Profiling: How It Works
  1. Enable static site generation using the toggle in the sidebar.
  2. As users browse your site normally, each page visit creates a static HTML file.
  3. Assets (CSS, JS, images, fonts) are automatically are queued and asyncronously downloaded and localized.
  4. Processing happens in the background and can be paused anytime.
  5. Download the complete static site as a ZIP file.
  6. Extract and open index.html in any browser — it works completely offline.
Key Features What's New in 2.0.6: 2.0.6 Version 2.0.6 is a WordPress.org compliance release.\ This update ensures full compatibility with the latest repository validation standards introduced in 2025, requiring prefixed template variables and enhanced namespace isolation. Although originally planned as a non-functional compliance update, we took the opportunity to introduce something valuable for developers — the foundation for advanced performance profiling. Compliance & Compatibility Developer Enhancements New developer hooks were introduced to support the forthcoming Static Cache Wrangler Performance Profiler, an optional MU plugin for benchmarking and advanced diagnostics via WP-CLI. The following hooks are now available for use: New Developer Tools Directory A new /tools/ directory has been added to the plugin to organize optional developer resources.\ It currently includes: Developers can download the latest version of the profiler from:\ https://moderncli.dev/code/static-cache-wrangler/performance-profiler/ Summary What's New in 2.0.5: Version 2.0.5 introduces enhanced static HTML output with comprehensive WordPress meta tag removal. Your generated static files are now 3.1% smaller, generate 2.3% faster, and contain zero WordPress-specific metadata. This makes them truly portable, more secure (no version exposure), and perfect for offline use or deployment to any platform. Two new developer hooks (stcw_remove_wp_head_tags and stcw_process_static_html) enable companion plugins and custom integrations, opening up possibilities for agencies, developers, and SaaS providers to extend the plugin without modifying core code. WP-CLI Commands Full control without the dashboard:

安装:

  1. Upload the plugin files to /wp-content/plugins/static-cache-wrangler/ or install via Plugins > Add New.
  2. Activate the plugin from the Plugins screen.
  3. Navigate to Settings → Static Cache to enable generation.
  4. Browse your site normally — pages are cached as they load.
  5. Click Download ZIP to export the complete static version.

屏幕截图:

  • Admin bar actions and stats
  • Background asset queue with progress indicator
  • Paused status with ability to resume

升级注意事项:

2.0.6 Change all standard template variables to include the prefix stcw_ for WordPress.Org WordPress.NamingConventions.PrefixAllGlobals compliance. 2.0.5 Enhanced multisite support with isolated directories per site. Storage moved to wp-content/cache/stcw_static/ with unique namespace. Fully backward compatible for new installs. WordPress.org compliant. 2.0.4 Major compliance update. Plugin renamed to Static Cache Wrangler. Clear old plugin before installing. All prefixes changed from SCG to STCW. No data migration needed as plugin not yet published. 2.0.3 WordPress.org compliance. All prefixes changed to STCW (4+ characters). Clear and regenerate static files after update. WP-CLI commands unchanged. 2.0 Major rewrite with modern standards, WP_Filesystem support, and enhanced security. Recommended for all users.

常见问题:

Does it work with any theme or builder?

Yes — Static Cache Wrangler captures the final rendered HTML, so it works with any theme, builder, or framework (Elementor®, Divi®, Gutenberg®, etc.).

Does it use a lot of resources?

No — it's designed as a lazy loader, generating static pages only on demand with minimal memory and CPU impact.

Does it modify my database?

No — it never alters your WordPress database schema or adds tables.\ All plugin-related options, transients, and scheduled events are automatically removed upon uninstall.

Can I use the exported site on any server?

Absolutely. The output is plain HTML and assets — deploy it on any web server, CDN, or open it directly in a browser.

Does it handle dynamic content?

Dynamic features like forms, comments, or live feeds won't function in the static version, but all rendered content and assets are preserved exactly.

How do I update after making changes?

Revisit the updated pages while generation is enabled, or run wp scw process to rebuild all static content.

Can I customize the configuration?

Yes! You can customize file locations and behavior using constants in wp-config.php: Change static files location: define('STCW_STATIC_DIR', WP_CONTENT_DIR . '/my-static-files/'); Change assets location: define('STCW_ASSETS_DIR', WP_CONTENT_DIR . '/my-assets/'); Disable async asset processing (process immediately): define('STCW_ASYNC_ASSETS', false);

What if I need advanced customization?

You can use WordPress filters to customize behavior: Exclude specific URLs from generation: add_filter('stcw_should_generate', function($should, $url) { if (strpos($url, '/private/') !== false) { return false; } return $should; }, 10, 2); Modify HTML before saving: add_filter('stcw_before_save_html', function($html) { return str_replace('</body>', '<footer>Generated: ' . date('Y-m-d') . '</footer></body>', $html); });

What WordPress meta tags are removed in version 2.0.5?

Version 2.0.5 removes the following WordPress-specific meta tags from static HTML:

  • RSD (Really Simple Discovery) links for XML-RPC
  • Windows Live Writer manifest links
  • WordPress shortlink tags
  • Generator meta tags (WordPress version)
  • REST API discovery links
  • oEmbed discovery links
  • REST API HTTP headers
  • data-wp-strategy attributes on script tags These tags serve no purpose in static sites and removing them improves portability and security.

How do I use the new developer hooks?

Remove additional WordPress tags: add_action('stcw_remove_wp_head_tags', function() { remove_action('wp_head', 'your_custom_action'); }); Modify HTML before saving: add_filter('stcw_process_static_html', function($html) { // Add custom footer, remove tracking, etc. return $html; }); See the plugin documentation for 15+ complete examples.

Do I need to regenerate my static files after upgrading?

No, but it's recommended. Existing static files will continue to work, but regenerating will give you the cleanest output with all WordPress meta tags removed: wp scw clear wp scw enable Then browse your site to regenerate pages.

Can I create companion plugins for Static Cache Wrangler?

Yes! Version 2.0.5 introduces two hooks specifically designed for companion plugins:

  • stcw_remove_wp_head_tags - Remove additional WordPress tags
  • stcw_process_static_html - Modify final HTML output These enable agencies, developers, and SaaS providers to build specialized extensions without modifying core plugin code.

Will this work with my SEO plugin?

Yes! Version 2.0.5 is fully compatible with:

  • Yoast SEO
  • Rank Math
  • All in One SEO Pack
  • SEOPress
  • The SEO Framework The meta tag removal only affects WordPress core tags, not SEO plugin meta tags that contain important information.

更新日志:

2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0 1.0