When a WordPress site fails after an update or behaves differently over SSH, collect the basic facts before changing anything. These commands check WP-CLI, WordPress core, plugins, and themes without modifying the site.
Run them from the directory containing wp-config.php. If WordPress is elsewhere, change to that directory first.
Check the WP-CLI environment
wp --info
wp --info shows which PHP binary, PHP version, database client, configuration files, and WP-CLI version your shell is using.
Run this first when WP-CLI behaves differently from the website. The web server and SSH session may use different PHP versions or configuration files. Compare the output with the environment shown in your hosting control panel.
Because this command does not load WordPress, it can also help when other WP-CLI commands fail during startup.
Confirm the WordPress version
wp core version
wp core version reads the installed WordPress version. Record it before investigating an update failure, compatibility problem, or unexpected dashboard change.
Do not assume the version shown in a hosting dashboard matches the files in the current directory. On servers with several WordPress installations, confirm that you are working in the correct document root.
Review installed plugins
wp plugin list --format=table
wp plugin list displays each plugin's status, installed version, update availability, and automatic-update setting.
Look for:
- A plugin that is active when it should be disabled
- An available update for a plugin involved in the error
- Multiple plugins providing similar caching, security, or optimization features
- A version that does not match your deployment records
The command is read-only. Do not immediately deactivate or update plugins on a production site. Take a backup first and confirm that you have a rollback path.
Check the active theme
wp theme list --format=table
wp theme list identifies the active theme and lists installed versions and available updates.
Check this when a problem affects templates, styling, the block editor, or theme-specific PHP code. It can also reveal that the site is running a child theme rather than the parent theme you were inspecting, or that you are working in the wrong WordPress installation.
Add debug details when a command fails
If a WP-CLI command returns an error without enough context, repeat it with the global --debug parameter:
wp plugin list --debug
The official WP-CLI troubleshooting guide recommends --debug for more detail about the bootstrap process and PHP errors.
Debug output may contain server paths or configuration details. Review and redact it before sharing the output publicly.
Run the checks together
For a quick read-only snapshot, run:
wp --info
wp core version
wp plugin list --format=table
wp theme list --format=table
If wp --info works but the other commands fail, WP-CLI itself is available. Check the current directory, WordPress files, database access, and code loaded during WordPress startup.
If all four commands work, use the reported versions and active components to narrow the investigation before making changes. The complete WP-CLI command reference lists additional commands for investigating a specific part of the site.