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?
- wp-cli Enabling Maintainance Mode
- WP-CLI – Selecting PHP version
- How can I bulk delete media and attachments using WP-CLI?
- wp media regenerate unknown –image_size parameter
- Remove all users from site except one using WP CLI
- How can I use WP-CLI commands without –allow-root
- wp-cli create post and media import
- Using WP CLI to set options in WP Multisite
- What is the difference between the Package Language and the Site Language?
- How to make sure that only one wp_cron() runs at a time?
- How do I update a nested option?
- Transients API and multisite
- How to create post in WP network using WP-CLI
- How to prevent WP-CLI shell from exiting when an exception occurs?
- Importing featured image to posts, duplicates the image
- WP-CLI Get Site ID from its url
- WP-CLI alias: connect with ssh proxy
- How to perform WordPress backups using wp-cli?
- Ask WP-CLI latest core WordPress version released
- Regenerate thumbnails unexpected resolution (96 x 96)
- WordPress Caching – Transients API or “update_user_meta ” Cronjob?
- WP Cli will not execute on Windows
- Different output from WP-CLI in bash vs PHP exec()
- Store sticky post’s ids in a transient
- Jetpack Upgrade fails with WP CLI [closed]
- When WP_CLI runs WordPress from the command line, are hooks called?
- Getting page output HTML without request (for CriticalCSS, PurgeCSS)
- How can I search and replace by post type?
- Error establishing a database connection when running phpunit
- Set Site Icon programmatically (eg. using `wp cli`)
- How to rename default category name and slug using WP CLI?
- Error: reassigning content to a different user is not supported on multisite
- Wildcard for wp-cli search-replace
- Transients API conditional
- Get media url (featured image) with wp-cli
- Can I use wp-cli to create posts with a custom post types?
- WP-CLI media import error
- Using Transients
- Is it possible to view WP documentation within the WordPress shell?
- Userless db-only wordpress instalation
- WPCLI doesn’t recognize the site
- wp-cli: Error establishing a database connection: undefined constant DB_USER
- Add passwords to config.yml to manage multiple sites
- Wp-CLI not working with WordPress installed with composer
- I am officially missing something about transient posts
- WP-Cli Error When Mapping Multisite Subdomain
- Using `set_transient()` when saving a custom post type
- WP changes siteurl, but some URLs then don’t work
- Install plugin on remote wordpress
- Set user status to absent on WordPress
- Make WordPress more like Jekyll (using wp-cli package?)
- When installing wordpress through WP CLI mysite.com/admin not working
- Hi , i am trying to set the post for 24 hours and with it will be changed
- Wp-cli from a plugin?
- Is it possible to update a single page using WP-CLI?
- How to use a transient inside WP_User_Query
- How to fix old embeded iframes with WP-CLI search-replace
- ignoring, hidding mu plugins when wp-cli is run
- how to use transient method?
- Can WP-CLI modify database connection details in existing wp-config file?
- is it possible to use wp cli to export custom post types