WP-CLI - Run a command command against multiple sites on WordPress multisite

wp site list --field=url | xargs -n1 -I % wp --url=% option update my_option my_value

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.