Optimize post insert and delete for bulk operations?

When updating post taxonomies, you can call wp_defer_term_counting( true ) before you do your mass operation, and then wp_defer_term_counting( false ) to update the term counts only once per term.

Leave a Comment