Skip to content

Instantly share code, notes, and snippets.

@PatelUtkarsh
Last active April 2, 2024 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatelUtkarsh/032ad987beaa8668f237892254f10dcf to your computer and use it in GitHub Desktop.
Save PatelUtkarsh/032ad987beaa8668f237892254f10dcf to your computer and use it in GitHub Desktop.
Disable jetpack sync
<?php
/**
* Plugin Name: Disable jetpack sync.
*/
add_filter( 'jetpack_sync_modules', '__return_empty_array', PHP_INT_MAX );
@PatelUtkarsh
Copy link
Author

Alternatively, If you don't want to add code, you can set the jetpack_sync_settings_disable option to 1.

For single site:

wp option update jetpack_sync_settings_disable 1 

For all site in the network:

wp site list --field=url | xargs -n1 -I {} wp --url={} option update jetpack_sync_settings_disable 1 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment