Using WP-CLI for server-side WordPress recovery

wordpresswp-cliops

When the admin UI is down, WP-CLI is often the fastest way back. It bypasses the web stack and gives you clear feedback so you can disable plugins, clear caches, or run updates from the shell.

Common uses

Why it helps

FAQ

Do I need WP-CLI on every server?
It’s most valuable on servers where you do maintenance or recovery. Install once and use for safer plugin updates and post–PHP-upgrade debugging.

The site is in maintenance mode and I can’t log in.
Remove the .maintenance file from the WordPress root (see fixing WordPress stuck in maintenance mode). If the admin is still broken, use WP-CLI to disable plugins or switch themes.