Skip to main content

Commands

Here are some examples of common WP-CLI commands that you might use:

Here is a list of some common WP-CLI commands:

  • wp core download: Downloads the latest version of WordPress and stores it in the current directory.

  • wp core install: Installs WordPress by running the installation script and prompts for database connection and site information.

  • wp plugin install: Installs a WordPress plugin.

  • wp plugin activate: Activates a WordPress plugin.

  • wp plugin deactivate: Deactivates a WordPress plugin.

  • wp plugin delete: Deletes a WordPress plugin.

  • wp theme install: Installs a WordPress theme.

  • wp theme activate: Activates a WordPress theme.

  • wp theme delete: Deletes a WordPress theme.

  • wp user create: Creates a new WordPress user.

  • wp user delete: Deletes a WordPress user.

  • wp db create: Creates a new database for WordPress.

  • wp db drop: Deletes the WordPress database.

  • wp search-replace: Performs a search-and-replace on the WordPress database.

  • wp post create: Creates a new WordPress post.

  • wp post delete: Deletes a WordPress post.

  • Note that these are just a few examples and WP-CLI has many other commands available for managing and interacting with a WordPress site. You can see the full list of available commands by running wp --help.