You can run any command against all sites in a network by combining the wp site list
and the | xargs
:
wp site list --field=url | xargs -n1 -I % wp --url=% transient delete --all
Source: https://runcommand.io/to/run-wp-cli-command-wordpress-multisite/
Related Posts:
- When should I be using the Transients API?
- Cache remote (HTTP) request with Transients API
- Is there any danger in deleting all transients?
- Why are transients cleared prematurely?
- Get a list of existing transients
- Storing posts social counters by using transient api
- How to save new transients if query changes?
- Integrating WP-TLC-Transients with WordPress – Where to Begin?
- Is priming a Transient Cache possible?
- What causes a transient to changes status to “Does Not Expire”?
- Reset Transient on New Day
- How to use transients and variables
- Transient storage location? database/xcache/w3Total Cache?
- How to delete transients written by fetch_feed()?
- Set Transient expiration
- WordPress transient doesn’t use the transient
- How do I reset a transient when updating a widget’s value?
- Is this the proper usage of creating / using a transient?
- Should I use the Transients API to temporarily hold edited attachements?
- transient or not transient
- Can Transients be used to store sensitive data?
- wp_options flooded with transient API entires
- Why Transients may not work correctly?
- How many transients is too many transients
- Synchronize Data every minute with set_transient
- Difference between get_site_transient() and get_transient()
- delete_transient on click inside a widget form
- Set_Transient to end at midnight
- Whats wrong with this transient? Not caching as expected
- Set transient with get posts error
- Clear Transients
- Unique Transients user id for Non-Logged In users
- Transient is never set. Why?
- Button to clear transients
- Set transient name
- Hacked site using transient API?
- Ajax call to transients
- Why can’t I save encrypted data in a transient?
- Doesn’t set_transient() add multiple rows with the same key?
- What would cause set_transient() and set_site_transient() to fail silently?
- Are transients garbage collected?
- How to change user password with wp-cli?
- Detect if WP is running under WP-CLI
- How does object caching work?
- Running WP Cron on multisite the right way
- WP CLI “Error establishing a database connection” in localhost (MAMP)
- how to update serialized options programatically?
- Should I use Transient API to store HTML String, or Object?
- Will it break my site if I delete all transient records in wp_options table?
- How I prevent a plugin to be loaded when doing WP-CLI?
- Fastest way (least amount of steps) to locally import a remote database using WP-CLI
- WP-CLI not recognizing commercial plugin updates
- Why is it important to deactivate a plugin before deleting it?
- wp-cli Enabling Maintainance Mode
- Is there a drush equivalent for WordPress yet?
- Is get_option() faster than accessing get_transient()?
- WP-CLI – Selecting PHP version
- How do I run a PHP script from WordPress environment, like `wp shell`?
- Using wp-cli can I not query pages by their title?
- wp-cli displays php notices when display errors off
- wp-cli 0.14.1 MySQL error
- How can I bulk delete media and attachments using WP-CLI?
- How to change user_login with wp-cli?
- Best practices for using the transients API
- How can I batch delete all unattached images with WP-CLI or other automated process?
- Are transients private or public?
- WP-CLI Cannot Connect to Database due to Vagrant
- Changing the WP CLI cache folder
- WordPress test environment on windows
- WP-CLI Process Killed
- Using transients in conjunction with memcached
- How to use wp-cli.yml file?
- wp-cli commands do nothing, return nothing
- WP cli –path does not seem to work
- Enable Auto-updates for all plugins using wp-cli? (since wordpress 5.5)
- How do I clone or duplicate a post with the WordPress Command Line Interface WP-CLI?
- wp-cron.php – How are WP’s Cron transients removed?
- Run WP-CLI using PHP
- How to update an ‘array’ option using wp-cli [duplicate]
- Do WordPress’ cron’s clean up expired transients?
- Using a wildcard with delete_transient()
- How to use command ‘wp post create’ in wp-cli properly?
- Does set_transient() overwrite/update transient option with same key?
- How do I activate an mu-plugin with WP-CLI?
- WP-CLI get all posts from certain post type and taxonomy term
- How to create a WP-CLI command with $_POST?
- wp-cli doesn’t find and wordpress installation
- What’s the case against transient-ing almost everything that’s mostly static?
- Does wp post delete also delete metadata associated with posts?
- WP-CLI :: Cannot installing plugin as www-data
- How to reset passwords for all users on a network using wp cli
- WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix
- WP-CLI Bulk delete posts from specific category
- Does using set_transient() function can lead to MySQL problems?
- Disable comment windows for all existing posts (pages/blogposts)
- wp media regenerate unknown –image_size parameter
- Fallback when Transient API fails
- Why does WordPress create two transients with the same name when I specify timeout value?
- Difference between deactivating, uninstalling, and deleting plugins
- wp-cli import theme sample data