# jetpack-sync-quiet: stop Jetpack’s sync loopbacks

jetpack-sync-quiet is a WordPress plugin for site operators who run Jetpack (or another plugin that bundles the Jetpack Sync package) on a site with heavy automated writes. It stops Jetpack's "dedicated sync" from sending the site an HTTP request to itself. The code is at [https://github.com/IndianOpinion/jetpack-sync-quiet](https://github.com/IndianOpinion/jetpack-sync-quiet), under the MIT licence. Version v0.1.0 was released on 12 November 2026.

## The problem

Jetpack Sync keeps a queue of changes and sends it to WordPress.com. With dedicated sync on, any request that ends with items still in the queue fires a non-blocking GET from the site to its own REST route, jetpack/v4/sync/spawn-sync. The request carries a time parameter, so page caches never absorb it. It boots WordPress in full, sends a batch, and spawns the next loopback if items remain.

On a site that writes a lot (imports, feeds, bulk edits, automated publishing) the queue is never empty. Almost every request then fires a loopback, and the loopbacks fire more loopbacks. We wrote this plugin to turn that off.

Jetpack already has a quieter flow. With dedicated sync off, it sends the queue at the end of POST, admin, cron and WP-CLI requests, and from its own jetpack_sync_cron event. The plugin switches the site to that flow and keeps it there.

## What it does

- Makes Jetpack read dedicated_sync_enabled as off on every request, without editing Jetpack and without changing the stored value.

- Forces sync_via_cron on by default, so a site with no sending requests still syncs.

- Lets the operator tune eight settings (queue size, queue lag, batch rows and bytes, cron time limit, wait time, and the two cron intervals) within validated ranges.

- Reports state through wp jetpack-sync-quiet status and a read-only Tools page: effective and stored values, queue size, queue lag, next cron run, cron health.

- Notices when something resets the setting, records it once, and does not fight it.

- Does nothing, and says so, when the Jetpack Sync package is absent or inactive.

## How it works

Jetpack stores each sync setting as an option named jetpack_sync_settings_<name> and reads it with get_option(). WordPress lets a plugin answer any get_option() call first through the pre_option_<option> filter, before the object cache and the database. The plugin answers the string "0" for the dedicated sync option. It returns a string because false means "not short-circuited" to WordPress.

The filters are added when the plugin file loads, at priority 1000. Jetpack first reads its settings on plugins_loaded at priority 90, which comes after every plugin file has loaded, so load order does not matter. A theme is too late, so filters that tune it belong in a plugin.

The main files are OptionFilter.php (the switch), Tunables.php (keys, ranges, precedence, validation), Guard.php (drift events and the fallback), JetpackSync.php (every call into Jetpack, each one existence-checked) and Status.php. The plugin makes no HTTP requests of its own, and a test fires every hook to check that.

The guard works like this. WordPress.com can ask for dedicated sync with a response header, and Jetpack stores the request. The plugin records that as a drift event and the filter still wins. If a Jetpack update ever stops the filter reaching Jetpack's reader, the guard sees it on wp_loaded. It then writes 0 once through Jetpack's own settings API, logs a warning and shows an admin notice.

Operators can set things from wp-config.php constants, a filter or WP-CLI:

wp jetpack-sync-quiet status
wp jetpack-sync-quiet settings set max_queue_size 20000
wp jetpack-sync-quiet settings set cron_interval 150 --network

Precedence is constant, then site value, then network value, then the jetpack_sync_quiet_settings filter, which has the last word.

## Guard rails

- The fallback write happens at most once per UTC day, whatever triggers it, so it cannot loop. JETPACK_SYNC_QUIET_GUARD_FALLBACK switches it off.

- The guard writes nothing if sync is not active (not connected, or disabled).

- Tunable ranges run from half to four times Jetpack's default. An invalid value is ignored, logged once, and Jetpack's own value applies. The jetpack_sync_quiet_ranges filter widens or narrows a range.

- JETPACK_SYNC_QUIET_DISABLE and the jetpack_sync_quiet_enabled filter turn the plugin into a no-op without removing it.

- Every call into Jetpack is checked with class_exists, method_exists and is_callable. An exception becomes "unknown" in status, not a fatal error.

- If the sync package is missing at plugins_loaded priority 1000, every filter and the guard event are removed.

- Rollback is deletion. Nothing was written to Jetpack's settings, so Jetpack returns to its stored value on the next request.

## What review changed

An independent review checked the diff against the PRD and the public Jetpack source. It changed these things before the merge:

- The admin page echoed a result string taken from the URL after "Run guard now". A crafted link could show an administrator arbitrary text, even escaped. The redirect now carries only a flag and the page reads the result from stored guard state.

- Status derived "last sync" as "no later than now minus queue lag". On a busy site a send can succeed and leave older items behind, so that bound was unsound. It now says "unknown" and shows the age of the oldest unsent change.

- uninstall.php did not refuse PHP below 8.1, and would have hit a fatal redeclare when a must-use copy had already declared the classes. Both are fixed.

- Disabled mode left behind the daily guard event from an earlier active run. It now clears it.

## Limits and what is next

- Sync needs cron that runs. With DISABLE_WP_CRON, check the system cron. Status warns when the sync event is overdue.

- If WordPress.com keeps asking for dedicated sync, Jetpack still writes the setting. Expect at most one validation loopback an hour and two small option writes per send. That is far below one loopback per request, and it is the price of not fighting Jetpack's writes.

- The plugin does not block the spawn-sync route. A request in flight at install time finishes normally.

- It was checked against Jetpack 16.3, 16.4 and 16.5-a.1 by reading their source. A later Jetpack may change.

- There are no open issues on the repo.

Test status: this is v0.1.0. 102 PHPUnit tests (417 assertions) pass against stubs of WordPress, WP-CLI and the Jetpack Sync package, and PHPStan level 8 and phpcs are clean. It has not been tested against a live Jetpack site. The CI workflow is parked in a pending folder because the release token could not write workflow files, so CI has not yet run on GitHub. PHP 8.1 and 8.2 are covered only by that CI. The measurement guide in the repo describes how to check the effect on your own access log.

## Install

Requires PHP 8.1 or later and WordPress 6.4 or later. No Composer is needed at runtime.

The package is not on Packagist yet, so first add a Composer vcs repository entry for https://github.com/IndianOpinion/jetpack-sync-quiet.

composer require indianopinion/jetpack-sync-quiet

For a must-use install, clone the repo into wp-content/mu-plugins and copy mu-loader/jetpack-sync-quiet-loader.php next to it. WordPress loads single files in that folder, not directories, so the loader is the file that requires the plugin.

[All 47 utilities](https://indianopinion.org/blog/open-source/) · [jetpack-sync-quiet on GitHub](https://github.com/IndianOpinion/jetpack-sync-quiet)

Canonical: https://indianopinion.org/blog/open-source/jetpack-sync-quiet/

AI disclosure: Every summary and comment here is written by AI and published automatically, without a person reviewing each article. We do no original reporting. How this works: https://indianopinion.org/ai-use-policy/
