PHPackages                             unloc/wp-cli-all-sites - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. unloc/wp-cli-all-sites

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

unloc/wp-cli-all-sites
======================

Run any WP-CLI command across all sites in a multisite network

1.0.0(2mo ago)612MITPHPPHP &gt;=8.2

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/unlocnl/wp-cli-all-sites)[ Packagist](https://packagist.org/packages/unloc/wp-cli-all-sites)[ RSS](/packages/unloc-wp-cli-all-sites/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

WP-CLI All Sites
================

[](#wp-cli-all-sites)

Run any WP-CLI command across every site in a WordPress multisite network.

No more piping `wp site list` through `xargs`. Just add `--all-sites` to any command and it runs on every site in the network, with progress tracking, error handling, and site exclusion built in.

Requirements
------------

[](#requirements)

- PHP 8.2+
- WP-CLI 2.5+
- WordPress multisite installation

Installation
------------

[](#installation)

```
wp package install unloc/wp-cli-all-sites

```

WP-CLI versions before 2.13 cannot resolve Packagist packages due to a bug in `package-command`. Use the git URL instead:

```
wp package install https://github.com/unlocnl/wp-cli-all-sites.git

```

Usage
-----

[](#usage)

Add `--all-sites` to any WP-CLI command to run it on every site in the network.

```
wp option get blogname --all-sites

```

### Flags

[](#flags)

FlagDescription`--all-sites`Run the command on every site in the network`--continue-on-error`Don't stop on first site failure`--except=`Comma-separated URLs or blog IDs to skipDestructive commands (`site delete`, `site empty`, `site archive`, etc.) prompt for confirmation. Pass `--yes` to skip the prompt.

Sub-commands run with stdin detached, so interactive prompts in the underlying command won't work. Pass `--yes` or equivalent flags to bypass them.

### Examples

[](#examples)

```
# Get blogname for all sites
wp option get blogname --all-sites

# Run on all sites except shop
wp cache flush --all-sites --except=shop.example.com

# Exclude by blog ID
wp cache flush --all-sites --except=3,7

# Continue even if a site fails
wp plugin list --all-sites --continue-on-error

# Run cron for all sites
wp cron event run --due-now --all-sites --continue-on-error

# Destructive: requires --yes
wp site empty --all-sites --yes

```

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance85

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ed9daf065d180c07266fb155fa37e2c2a567f43dde72d5138a8cb1b771a7c9a?d=identicon)[unlocdavid](/maintainers/unlocdavid)

---

Top Contributors

[![unlocdavid](https://avatars.githubusercontent.com/u/75703724?v=4)](https://github.com/unlocdavid "unlocdavid (2 commits)")

### Embed Badge

![Health badge](/badges/unloc-wp-cli-all-sites/health.svg)

```
[![Health](https://phpackages.com/badges/unloc-wp-cli-all-sites/health.svg)](https://phpackages.com/packages/unloc-wp-cli-all-sites)
```

###  Alternatives

[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11610.4M52](/packages/wp-cli-i18n-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

768.0M30](/packages/wp-cli-db-command)[wp-cli/server-command

Launches PHP's built-in web server for a specific WordPress installation.

687.2M5](/packages/wp-cli-server-command)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
