{"id":34630,"date":"2021-12-28T15:58:16","date_gmt":"2021-12-28T15:58:16","guid":{"rendered":"https:\/\/www.hostduplex.com\/kb\/?post_type=ht_kb&#038;p=34630"},"modified":"2021-12-28T16:32:43","modified_gmt":"2021-12-28T16:32:43","slug":"wp-cli","status":"publish","type":"ht_kb","link":"https:\/\/www.hostduplex.com\/kb\/article\/wp-cli\/","title":{"rendered":"WP-CLI"},"content":{"rendered":"\n<p>WP-CLI&nbsp;is the command-line interface for&nbsp;WordPress. It is used by developers to manage common tasks of a WordPress installation. It can add\/remove users, posts, categories, insert test data, search and replace in the database, reset passwords, help troubleshoot performance issues, and much more actions you can otherwaise perform in the WordPress admin.<\/p>\n\n\n\n<p>The current stable release is&nbsp;<a href=\"https:\/\/make.wordpress.org\/cli\/2021\/05\/19\/wp-cli-v2-5-0-release-notes\/\" target=\"_blank\" rel=\"noopener\">version 2.5.0<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">List of commands<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Command<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>wp admin<\/td><td>Open \/wp-admin\/ in a browser. <\/td><\/tr><tr><td>wp cache<\/td><td>Adds, removes, fetches, and flushes the WP Object Cache object. <\/td><\/tr><tr><td>wp cap<\/td><td>Adds, removes, and lists capabilities of a user role. <\/td><\/tr><tr><td>wp cli<\/td><td>Reviews current WP-CLI info, checks for updates, or views defined aliases. <\/td><\/tr><tr><td>wp comment<\/td><td>Creates, updates, deletes, and moderates comments. <\/td><\/tr><tr><td>wp config<\/td><td>Generates and reads the wp-config.php file. <\/td><\/tr><tr><td>wp core<\/td><td>Downloads, installs, updates, and manages a WordPress installation. <\/td><\/tr><tr><td>wp cron<\/td><td>Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules. <\/td><\/tr><tr><td>wp db<\/td><td>Performs basic database operations using credentials stored in wp-config.php. <\/td><\/tr><tr><td>wp dist-archive<\/td><td>Create a distribution archive based on a project\u2019s .distignore file. <\/td><\/tr><tr><td>wp embed<\/td><td>Inspects oEmbed providers, clears embed cache, and more. <\/td><\/tr><tr><td>wp eval<\/td><td>Executes arbitrary PHP code. <\/td><\/tr><tr><td>wp eval-file<\/td><td>Loads and executes a PHP file. <\/td><\/tr><tr><td>wp export<\/td><td>Exports WordPress content to a WXR file. <\/td><\/tr><tr><td>wp find<\/td><td>Find WordPress installations on the filesystem. <\/td><\/tr><tr><td>wp help<\/td><td>Gets help on WP-CLI, or on a specific command. <\/td><\/tr><tr><td>wp i18n<\/td><td>Provides internationalization tools for WordPress projects. <\/td><\/tr><tr><td>wp import<\/td><td>Imports content from a given WXR file. <\/td><\/tr><tr><td>wp language<\/td><td>Installs, activates, and manages language packs. <\/td><\/tr><tr><td>wp maintenance-mode<\/td><td>Activates, deactivates or checks the status of the maintenance mode of a site. <\/td><\/tr><tr><td>wp media<\/td><td>Imports files as attachments, regenerates thumbnails, or lists registered image sizes <\/td><\/tr><tr><td>wp menu<\/td><td>Lists, creates, assigns, and deletes the active theme\u2019s navigation menus. <\/td><\/tr><tr><td>wp network<\/td><td>Perform network-wide operations. <\/td><\/tr><tr><td>wp option<\/td><td>Retrieves and sets site options, including plugin and WordPress settings. <\/td><\/tr><tr><td>wp package<\/td><td>Lists, installs, and removes WP-CLI packages. <\/td><\/tr><tr><td>wp plugin<\/td><td>Manages plugins, including installs, activations, and updates. <\/td><\/tr><tr><td>wp post<\/td><td>Manages posts, content, and meta. <\/td><\/tr><tr><td>wp post-type<\/td><td>Retrieves details on the site\u2019s registered post types. <\/td><\/tr><tr><td>wp profile<\/td><td><\/td><\/tr><tr><td>wp rewrite<\/td><td>Lists or flushes the site\u2019s rewrite rules, updates the permalink structure. <\/td><\/tr><tr><td>wp role<\/td><td>Manages user roles, including creating new roles and resetting to defaults. <\/td><\/tr><tr><td>wp scaffold<\/td><td>Generates code for post types, taxonomies, plugins, child themes, etc. <\/td><\/tr><tr><td>wp search-replace<\/td><td>Searches\/replaces strings in the database. <\/td><\/tr><tr><td>wp server<\/td><td>Launches PHP\u2019s built-in web server for a specific WordPress installation. <\/td><\/tr><tr><td>wp shell<\/td><td>Opens an interactive PHP console for running and testing PHP code. <\/td><\/tr><tr><td>wp sidebar<\/td><td>Lists registered sidebars. <\/td><\/tr><tr><td>wp site<\/td><td>Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation. <\/td><\/tr><tr><td>wp super-admin<\/td><td>Lists, adds, or removes super admin users on a multisite installation. <\/td><\/tr><tr><td>wp taxonomy<\/td><td>Retrieves information about registered taxonomies. <\/td><\/tr><tr><td>wp term<\/td><td>Manages taxonomy terms and term meta, with create, delete, and list commands. <\/td><\/tr><tr><td>wp theme<\/td><td>Manages themes, including installs, activations, and updates. <\/td><\/tr><tr><td>wp transient<\/td><td>Adds, gets, and deletes entries in the WordPress Transient Cache. <\/td><\/tr><tr><td>wp user<\/td><td>Manages users, along with their roles, capabilities, and meta. <\/td><\/tr><tr><td>wp widget<\/td><td>Manages widgets, including adding and moving them within sidebars. <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-background has-purple-background-color has-purple-color\"\/>\n\n\n\n<p>If you are a Host Duplex customer and still have questions, please open a ticket in the&nbsp;<a href=\"https:\/\/secure.hostduplex.com\/clientarea.php\" target=\"_blank\" rel=\"noopener\">Host Duplex client portal.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WP-CLI&nbsp;is the command-line interface for&nbsp;WordPress. It is used by developers to manage common tasks of a WordPress installation. It can add\/remove users, posts, categories, insert test data, search and replace in the database, reset passwords, help troubleshoot performance issues, and much more actions you can otherwaise perform in the WordPress&#8230;<\/p>\n","protected":false},"author":2,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"ht-kb-category":[163],"ht-kb-tag":[156,233,45,232],"class_list":["post-34630","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-wordpress","ht_kb_tag-command-line","ht_kb_tag-commands","ht_kb_tag-wordpress","ht_kb_tag-wp-cli"],"_links":{"self":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/comments?post=34630"}],"version-history":[{"count":3,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34630\/revisions"}],"predecessor-version":[{"id":34644,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb\/34630\/revisions\/34644"}],"wp:attachment":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/media?parent=34630"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=34630"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=34630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}