A Google Gemini generated image representing the WordPress CLI.

The WordPess CLI Command List

WordPress CLI (WP-CLI) is a powerful command-line tool for managing WordPress installations. It provides a set of commands that allow users to perform various tasks, such as installing and updating WordPress, managing plugins and themes, and manipulating database content. The following list covers all the available WP-CLI commands along with a brief explanation of each.

wp admin – Opens /wp-admin/ in a browser.
wp cache – Adds, removes, fetches, and flushes the object cache.
wp cap – Adds, removes, and lists capabilities of a user role.
wp cli – Reviews current WP-CLI info, checks for updates, or views defined aliases.
wp comment – Creates, updates, deletes, and moderates comments.
wp config – Generates and reads the wp-config.php file.
wp core – Downloads, installs, updates, and manages a WordPress installation.
wp cron – Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.
wp db – Performs basic database operations using credentials stored in wp-config.php.
wp dist-archive – Creates a distribution archive based on a project’s .distignore file.
wp embed – Inspects oEmbed providers, clears embed cache, and more.
wp eval – Executes arbitrary PHP code.
wp eval-file – Loads and executes a PHP file.
wp export – Exports WordPress content to a WXR file.
wp find – Finds and displays WordPress core files and directories.
wp help – Displays help for a specific command.
wp i18n – Provides internationalization tools for WordPress projects.
wp import – Imports content from a WXR file.
wp language – Installs, activates, and manages language packs.
wp maintenance-mode – Activates, deactivates or checks the status of the maintenance mode of a site.
wp media – Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
wp menu – Lists, creates, assigns, and deletes the active theme’s navigation menus.
wp network – Performs network-wide operations.
wp option – Retrieves and sets site options, including transients.
wp package – Lists, installs, activates, and removes WP-CLI packages.
wp plugin – Manages plugins, including installs, activations, and updates.
wp post – Creates, updates, deletes, and manages posts, pages, and custom post types.
wp post-type – Retrieves details on the site’s registered post types.
wp profile – Quickly identify what’s slow with WordPress.
wp rewrite – Lists or flushes the site’s rewrite rules, updates the permalink structure.
wp role – Manages user roles, including creating new roles and resetting to defaults.
wp scaffold – Generates code for post types, taxonomies, plugins, child themes, etc.
wp search-replace – Searches and replaces strings in the database.
wp server – Launches PHP’s built-in web server for a specific WordPress installation.
wp shell – Enters an interactive PHP console within the WordPress environment.
wp sidebar – Lists registered sidebars.
wp site – Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.
wp super-admin – Lists, adds, or removes super admin users on a multisite installation.
wp taxonomy – Retrieves information about registered taxonomies.
wp term – Manages taxonomy terms and term meta, lists terms in a taxonomy.
wp theme – Manages themes, including installs, activations, and updates.
wp transient – Retrieves and sets transient values.
wp user – Manages users, along with their roles, capabilities, and meta.
wp widget – Manages sidebar widgets, including adding and moving them.

WP-CLI is an essential tool for developers and administrators who prefer working with the command line or need to automate WordPress tasks. By familiarizing yourself with these commands, you can streamline your workflow and efficiently manage your WordPress installations. Keep in mind that each command has its own set of subcommands and arguments, which provide more granular control over specific tasks.

Copyright 3141 sm314.com. All rights reserved.