You batch-update 20 plugins, and one breaks the site. Most WordPress maintenance tools play it safe and roll back all 20 updates (variations on "Safe Updates" or "Atomic Updates"). It's a reasonable default.
But running in production, you start running into cases where you want only the broken one reverted, and the other 19 to keep their updates. Here's how that design is built on top of WP-CLI.
The command that makes it possible — wp plugin install --version=X --force
WP-CLI has a powerful command for "install a plugin at a specific version, overwriting whatever's currently there":
wp plugin install <plugin-slug> --version=1.2.3 --force --skip-plugins --skip-themes
What each flag does:
--version=1.2.3— Specifies the older version to install (any version published on WP.org works)
--force— Overwrites if the plugin is already installed
--skip-plugins --skip-themes— Skips plugin/theme loading at WP-CLI startup, so WP-CLI itself doesn't crash even when a broken plugin is present (.↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
SOCIAL SHARE CARD GENERATOR