WP-CLI

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 --skip-plugins

We're using --skip-plugins to not load code which might've caused the issue.

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 activate a working one. Open WP-CLI and run:

wp theme list --skip-themes

We're using `--skip-themes` to not load code which might've caused the issue.

To list which themes are available for activation. Choose one and run:

wp theme activate theme-slug --skip-themes <br>

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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us