The WordPress command-line interface (WP-CLI in short) is a very powerful tool. Usually used by advanced users, it can also be enormously helpful to users willing to learn a few basic commands.
WP-CLI is a great tool and it has amazing documentation, so we highly recommend you check it out and learn more about managing WordPress through the command-line interface.
Disable a Plugin
If a plugin completely breaks your WordPress installation, the easiest way to get it back online is to use WP-CLI to disable the offending plugin. All you need to enter in the command line is:
wp plugin deactivate offending-plugin-slug
If the plugin has an issue in the code, run this command that will ignore the plugin files:
wp plugin deactivate offending-plugin-slug --skip-plugins
You need to flush cache once the offending plugin is disabled for the store to come back online. See how to restart PHP workers lower in this article.
If you're not sure what the plugin slug is, run:
wp plugin list
And you'll get a simple list of all plugins, specifically their slugs:
Or you can disable all plugins:
wp plugin deactivate --all
Disable a Theme
If the culprit for the broken store is the theme, then you need to use the File System access to delete the theme folder. Once that is done, open WP-CLI and run:
wp theme list
To list which themes are available for activation. Choose one and run:
wp theme activate theme-slug
Restart PHP Workers to Flush Cache
Once you're done with your changes, you need to restart PHP workers so that the changes make an immediate effect.
You can also use this to clear the cache if you can't access the WordPress admin.