WP-CLI - Update one option on multiple sites using xargs

wp site list --field=url | xargs -n1 -I {} sh -c 'wp --url={} option update sample_key sample_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.