WordPress Maintenance

When WP-CLI fatals on the plugin you came to rescue

A WordPress plugin update breaks the site. You SSH in to roll back the bad plugin with WP-CLI, and you get this: Fatal error: Uncaught Error: … in /path/to/broken-plugin/main.php:42 The plugin you came to fix has now stopped the tool you came to fix it with. It looks contradictory, but it makes sense once you know how WP-CLI starts up — and there’s a flag pair that gets you out. Why WP-CLI itself crashes When you run a rollback command like wp plugin install <name> –version=X –force, WP-CLI internally boots WordPress before doing anything else. Plugin registration and option loading all happen during WordPress’s startup, so a broken plugin gets …

Read more