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.

Update your store with one command

You can update your store with just one command:

wp core update && wp theme update --all && wp plugin update --all && wp core language update && wp core update-db

You can also run updates separately:

wp core update

wp theme update --all

wp plugin update --all

wp core language update

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.

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 that might've caused the issue.

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 that might've caused the issue.

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

wp theme activate theme-slug --skip-themes

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