Linux 软件免费装

StaticQ Headless

开发者 goonydev
philooo
更新时间 2026年9月18日 12:25
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cache performance astro cloudflare headless

下载

1.0.0

详情介绍:

StaticQ Headless turns WordPress into the CMS behind a Cloudflare-hosted Astro frontend. Editors keep the familiar WordPress admin; visitors get static-fast pages served from Cloudflare's edge and a durable R2 cache; and the plugin keeps both sides in sync automatically, without a full rebuild, a cron job, or a manual cache purge on every edit. When you publish, update, unpublish, or reschedule a post, the plugin works out exactly which URLs changed (the post's permalink, the archives and paginated archives it appears on, the relevant feeds, and the sitemap) and refreshes only those. Nothing else is touched, so a single edit never invalidates your whole site. Important: everything the plugin does runs against your own Cloudflare and GitHub accounts, using credentials you provide. StaticQ Headless does not send your content or credentials to any StaticQ-operated server. There is no telemetry and no phone-home. See External services below. What it does Bring your own Astro templates The StaticQ Astro starter (the repository the wizard generates into your GitHub account) is a starting point, not a straitjacket. Replace its pages and components with your own design and deploy through the same managed pipeline (connect your repository and push). The one requirement is that your project keeps the plugin's caching contract that the starter ships with (the edge/R2 middleware, the cache-key module, and the WordPress data client), so per-URL invalidation keeps working. The built-in Tutorials cover exactly what to keep.

安装:

  1. Upload the staticq-headless folder to /wp-content/plugins/, or install the plugin ZIP from Plugins → Add New → Upload Plugin.
  2. Activate the plugin through the Plugins screen.
  3. Open StaticQ Headless → Settings. The Setup tab walks you through connecting Cloudflare and deploying the receiver Worker.
  4. Open StaticQ Headless → Astro Setup and follow the wizard to connect or create a GitHub repository and deploy the Astro frontend.
  5. New to it? StaticQ Headless → Tutorials has step-by-step guides.
Recommended: keep secrets in wp-config.php For production, define credentials as constants in wp-config.php (above the "That's all, stop editing!" line) instead of storing them in the database. When a constant is defined it takes precedence and the matching field renders read-only. define( 'SQHEADLESS_CF_API_TOKEN', '...' ); define( 'SQHEADLESS_CF_ACCOUNT_ID', '...' ); define( 'SQHEADLESS_CF_ZONE_ID', '...' ); define( 'SQHEADLESS_PER_URL_SECRET', '...' ); For the managed Astro deploy, a GitHub token constant is used: define( 'SQHEADLESS_AA_GITHUB_TOKEN', 'ghp_...' ); Additional optional constants (receiver-only tokens, site-gate cookies, per-install worker/bucket suffix) are documented in the plugin's docs. Requirements

屏幕截图:

  • Cache tab: toggle URL families, per-URL invalidation, warmup, and health checks.
  • Astro Setup wizard: connect or create a GitHub repository and deploy the frontend.
  • Refresh Simulator: dry-run exactly which URLs an edit will refresh, with your hooks applied.
  • Built-in Tutorials, rendered inside wp-admin.

升级注意事项:

1.0.0 Initial public release.

常见问题:

Does StaticQ Headless host my site?

No. It deploys to your Cloudflare account and your GitHub repository. You own the infrastructure and the code.

Does it send my content or credentials to StaticQ?

No. The plugin only contacts your own Cloudflare and GitHub accounts (endpoints you configure) and the receiver URL you set. There is no telemetry and no author-operated service. See External services.

Do I have to use the StaticQ Astro starter as-is?

No. It is a starting point: you can replace its pages and components with your own Astro design and deploy through the same pipeline, as long as your project keeps the plugin's caching contract (the edge/R2 middleware, cache-key module, and WordPress data client the starter ships with). The built-in Tutorials cover this.

Do I need the GitHub and Cloudflare setup?

Yes, for the headless setup this plugin is built for. The fast edge + R2 delivery comes from the Cloudflare Worker and the Astro frontend, and the frontend is deployed and kept in sync through GitHub. (Internally the invalidation engine simply POSTs the changed URLs to a receiver URL, but the supported, complete experience is the Cloudflare + Astro pipeline.)

Is a full rebuild triggered on every edit?

No. That is the point: the plugin computes the specific URLs a change affects and refreshes only those, so publishing costs the same whether the site has fifty pages or fifty thousand.

Does it require shell access or proc_open?

No. Repository creation and the starter push happen over the GitHub API. Nothing is executed on your server.

Which SEO plugins are supported?

Rank Math and Yoast are detected automatically and their <head> and schema are used by the frontend. Neither is required; the plugin fills in breadcrumb structured data when the SEO plugin does not.

How do I extend which URLs get refreshed?

Use the sqheadless/object_urls, sqheadless/affected_objects, and sqheadless/static_archive_urls filters (and the sqheadless/content_change action to observe events). The Refresh Simulator on the Cache tab dry-runs your hooks and shows the exact URL list. A full reference ships with the plugin.

更新日志:

1.0.0