xargs is unnecessary, something similar to this will do the job without any piping or xargs
:
sites=$(wp site list --field=url)
for site in $sites
do
users=$(wp user list --url="$site" --role=subscriber)
for user in $users
do
wp user delete $user --url="$site" --reassign=4
end
end
Related Posts:
- 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 is not working properly. No response from commands
- Generate WP-CLI @alias for each site on multisite
- Using WP CLI to set options in WP Multisite
- Can wp-cli display all users and their roles across all sites in a multisite instance?
- WP-CLI can’t list posts
- Removing a wordpress multisite installation and preserving the database before migrate to nginx
- How to create a network using a command line script?
- WP-CLI cron on multisite using WP-Toolkit “succeded”, but callback not executed
- Error: reassigning content to a different user is not supported on multisite
- Migrating Multisite with WP-Cli and/or Search-Replace-DB
- Create WordPress Multisite Instance Programmatically
- WP-Cli Error When Mapping Multisite Subdomain
- wp option get blogname –url=my-sub-site.com returning main site option
- WP-CLI Error Requesting CURL Extension
- wp cli search and replace on –network Error reconnecting to the database
- wp-cli core install –skip-email and –skip-config flags not working on MAMP unknown parameter
- Plugin for editing options on multisite?
- How to share WordPress core library
- Change wordpress Multisite default site from side id 1 to side id 2
- How can I have network sites not use year/month folders by default?
- 4 single sites VS multisite wordpress
- Why can’t a WordPress network (multisite) in it’s own folder use subdomains?
- Two-level multisites in WordPress
- Display custom homepage text based on domain
- Add new domain to ‘My Sites’ using network admin
- Is there an advantage of using multisite if I have multiple WordPress websites for myself?
- WordPress Multisite Login Access
- Switch_to_blog() outside wordpress
- Jetpack Blog Subscriptions on Multisite [closed]
- current_user_can(‘Administrator’) does not return true in multisite if user is Administrator but NOT Super Admin
- How to remove the Tools menu item from the WP-Admin menu
- cant enable theme in multisite
- Override database config for WordPress multisite
- ‘Remote Login’ with MultiSite Domain Mapping still forcing users to login to all blogs individually?
- Change multi-site installation from sub-domains to sub-directories
- Multisite on Rackspace Cloud (ubuntu lucid)
- how could I have a user signing up for a blog, be assigned to that blog only
- oEmbed in wordpress multisite not working
- WordPress multisite installation broke menu links
- How to search users globally on a multisite install?
- Upload images from one site to another in Multisite
- Hide active themes on multisite subdomains
- Multisite: copy template when a subsite is created
- Password protect a single site on network
- ‘Cheatin’ uh?’ Error When Attempting to Upload Images After 3.4 Update
- How to get permalink using get_blog_post function in a multisite?
- Multisite gives Error if i want to enter Dashboard or Site
- Multisite with different domain names on different servers
- Good way to block users within a multisite setup without deleting them?
- Use separate S3 buckets for separate sites in a multisite environment
- Multisite Posting Recent Items in All the Sites Linked with Multisite
- single sign on for wordpress multi site
- How can you override the is_multisite check in wp-login.php for individual login/registration?
- 2 website 1 database… Local to online
- Issue with Multisite and SSL
- Custom port problem with local MU installation
- Multisites – Select homepage based on location
- Switch to blog and get content from that blog
- How do I create a multi site network?
- List recent 25 blogs across the network
- How to Deny Access to No Referrer Requests on Multiste with Mapped domains
- Making a Multisite Dashboard Widget
- Add wordpress multi sites with different port number from 80
- Include www prefix in site URL
- Is this possible? A multisite with “www.example.com/en/blog/” and “www.example.com/cn/blog/” (two directories deep)
- Can’t create a subdomain network – and WP is installed in webroot, not a folder
- How to make my third multisite blog start with id 1000?
- Sharing users across multiple sites, each on their own database
- Filter meta request
- Is this a good case for Multisite?
- WP Multisite – How to create a custom “router” for blog prefixes?
- How to make subdomain and muti-site but wordpress isn’t in root?
- Show buddypress profile fields in a multsite blog [closed]
- Add www to the Root Site in WP Multisite Network
- Multisite problem with unexisting paths to CSS etc
- Media library links broken WordPress Multisite after SSL update
- How to disable Gutenberg editor from Multisite Admin panel?
- Multisite wp-admin redirecting to main wp-admin using NGINX
- Separated Theme file on multi site network in subdomain
- Send data from one WP instance to another and process it there
- User not staying logged into one of sub sites in multisite after SSL
- WordPress Multisite Network Subdomain
- register_setting() for single site vs update_site_option() for mu
- Allow users to register on multisite through WooCommerce using the same email address
- Use a single WP installation instead of three
- Sending SMTP mail using a server with self-signed SSL
- Can WordPress Multisite work like a regular site?
- Site w/ Addon Domain doesn’t show CSS
- WordPress MU – Creating a site takes ages
- WordPress Multisite — Have same navigation, sidebar and footer across all sites.
- Primary site file uploads failing, subdirectory subsites upload fine
- Run “get_the_post_thumbnail” with a different table prefix?
- Comment reporting for Multisite
- How to display the most popular posts of all the blogs in a mu setup? [duplicate]
- WordPress MS wp-admin/includes/post.php error with shortcode generator
- All links to images are broken in a subdomain multi site environment
- 404 error in dashboard of subdomain of multisite
- WordPress Multisites