Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 21, 2015 22:00
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 jchristopher/485449fff32d124fa7e0 to your computer and use it in GitHub Desktop.
Save jchristopher/485449fff32d124fa7e0 to your computer and use it in GitHub Desktop.
Throttle the SearchWP indexer by injecting a wait time in between indexer passes
<?php
// inject a 1 second throttle to the SearchWP indexer process to reduce server load
function my_searchwp_indexer_throttle( $wait_time ) {
return 1;
}
add_filter( 'searchwp_indexer_throttle', 'my_searchwp_indexer_throttle' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment