Created
September 18, 2017 23:55
-
-
Save falexandrou/5e9b0a1fb13afa5fd09068eeb2bf0a2a to your computer and use it in GitHub Desktop.
Reduce Database load caused by Jetpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Jetpack custom cron schedule to reduce cron load | |
// Add it in your site-speicic plugin or the theme's functions.php | |
add_filter( 'jetpack_sync_incremental_sync_interval', function() { return 'hourly'; } ); | |
add_filter( 'jetpack_sync_full_sync_interval', function() { return 'daily'; } ); | |
add_filter( 'jetpack_sync_listener_should_load', '__return_false' ); | |
add_filter( 'jetpack_sync_sender_should_load', '__return_false' ); | |
add_filter( 'pre_option_jetpack_sync_settings_sync_via_cron', '__return_zero' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment