Deprecated: Return type of Twig\Node\Node::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/jaimemartinez/_deployments/releases/20250323153308/public_html/wp-content/mu-plugins/clarkson-core/vendor/twig/twig/src/Node/Node.php on line 213

Deprecated: Return type of Twig\Node\Node::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/jaimemartinez/_deployments/releases/20250323153308/public_html/wp-content/mu-plugins/clarkson-core/vendor/twig/twig/src/Node/Node.php on line 221
Force re-install all plugins with WP-CLI - Jaime Martinez

Force re-install all plugins with WP-CLI

In the category of handy snippets I sometimes use. This one lets you install all plugins. Sometimes a deployment gets cut of or isn’t succesfull for some weird reason and I’m gettings errors while loading WordPress. I’m adding —skip-plugins because most of the times a plugins is borked. And I’m adding --skip-themes just in case a theme is broken.

wp plugin install $(wp plugin list --skip-plugins --skip-themes --field=name) --force --skip-plugins --skip-themes

To reinstall all WordPress themes in the same manner use:

wp theme install $(wp theme list --skip-plugins --skip-themes --field=name) --force --skip-plugins --skip-themes

Enjoy!