permalinks – flush_rewrite_rules on MultiSite
I’m trying to update all the permalinks on my MU install. But I’m not sure how to go about it.
This is what I have so far. But I think it’s only updating the first sites permalinks.
switch_to_blog( $site->id ); delete_option( 'rewrite_rules' ); global $wp_rewrite; $wp_rewrite->init(); $wp_rewrite->flush_rules(); restore_current_blog();