WP-CLI - Flush rewrite rules for all sites

# flush rewrites for all sites for SITE in $(wp site list --field=url); do wp --url=$SITE rewrite flush; done; # show site URL before flush for SITE in $(wp site list --field=url); do echo $SITE && wp --url=$SITE rewrite flush; done;

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.