{"id":759,"date":"2026-10-06T11:46:42","date_gmt":"2026-10-06T10:46:42","guid":{"rendered":"https:\/\/hostpro.com\/blog\/?p=759"},"modified":"2026-10-06T11:47:41","modified_gmt":"2026-10-06T10:47:41","slug":"how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands","status":"publish","type":"post","link":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/","title":{"rendered":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>WP-CLI (WP Command Line Interface)<\/strong> is a utility for managing WordPress sites that allows you to perform various administrative tasks directly from the command line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this utility, you can do the following without using a browser:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Manage your WordPress site.<\/strong> With WP-CLI, you can update the WordPress core, plugins, and themes; create database backups; clear the cache; and much more.<\/li>\n\n\n\n<li><strong>Manage content.<\/strong> WP-CLI allows you to import, export, create, update, and delete posts, pages, users, media files, and comments.<\/li>\n\n\n\n<li><strong>Change site settings.<\/strong> This includes the site URL, headers, permalink structure, and more.<\/li>\n\n\n\n<li><strong>Manage development.<\/strong> WP-CLI includes commands for working with themes and plugins, such as checking code for compliance with WordPress standards and running unit tests.<\/li>\n\n\n\n<li><strong>Use WordPress Multisite.<\/strong> WP-CLI lets you manage a network of sites, including creating and deleting sites, managing network users, and more.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">WP-CLI is available on both our <a href=\"https:\/\/hostpro.com\/wordpress-hosting\">WordPress Hosting<\/a> and all other shared hosting plans.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, since WP-CLI isn\u2019t installed by default on most operating system distributions, it\u2019s usually not available on VPS servers. If needed, you can install it yourself or contact our <a href=\"https:\/\/hostpro.com\/billing\/submitticket.php?step=2&amp;deptid=3\">technical support<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we\u2019ll show you how to install WP-CLI. We\u2019ll also provide a list of the most commonly used WordPress command-line commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing WP-CLI<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, you need to access the files on the server via SSH. Please note that SSH access is disabled by default on our <a href=\"https:\/\/hostpro.com\/web-hosting\">shared hosting<\/a> for security reasons and must be enabled separately on <a href=\"https:\/\/hostpro.com\/linux-vps\">virtual server<\/a> plans with cPanel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, please <strong>submit a request to<\/strong> <a href=\"https:\/\/hostpro.com\/billing\/submitticket.php?step=2&amp;deptid=3\">technical support<\/a>, and we will grant you access 24\/7.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once we enable SSH on our end, you will see a \u201c<strong>Terminal<\/strong>\u201d option in the \u201c<strong>Advanced<\/strong>\u201d section of the cPanel control panel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"325\" src=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1024x325.png\" alt=\"Installing WP-CLI via cPanel | HostPro blog\" class=\"wp-image-760\" style=\"aspect-ratio:3.1518324607329844\" srcset=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1024x325.png 1024w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-300x95.png 300w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-766x243.png 766w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image.png 1298w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select the directory where you want to install WP-CLI. Then download the <em>wp-cli.phar<\/em> file using either <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-highlight-color\">wget<\/mark> or <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-highlight-color\">curl<\/mark>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will download the WP-CLI file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check to see if WP-CLI is working (PHP version 7.0 or higher):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php wp-cli.phar --info<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If WP-CLI was installed successfully, you\u2019ll see something like this when you run it:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"427\" src=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-2.png\" alt=\"What will be displayed in the Terminal if WP-CLI is successfully installed | HostPro blog\" class=\"wp-image-762\" style=\"aspect-ratio:2.181159420289855\" srcset=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-2.png 930w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-2-300x138.png 300w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-2-767x352.png 767w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next, be sure to set the execution permissions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x wp-cli.phar<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And to be able to simply type `wp` instead of `php wp-cli.phar`, create an alias by specifying the local path to the executable file. Open the file in a text editor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim ~\/.bashrc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To enter edit mode in VIM, press the Insert key and make your changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the alias at the end of the file in this format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias wp=\u2018php ~\/wp-cli.phar\u2019<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The quotes should enclose the command and the path to the file to be executed. Then save the file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"535\" src=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1-1024x535.png\" alt=\"Installing WP-CLI. WordPress Hosting | HostPro blog\" class=\"wp-image-761\" style=\"aspect-ratio:1.9111111111111112\" srcset=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1-1024x535.png 1024w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1-300x157.png 300w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1-768x401.png 768w, https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/image-1.png 1147w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To save your changes and exit, press \u201cESC,\u201d type \u201c:\u201d (a colon) and \u201cwq,\u201d then press \u201cEnter.\u201d<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.bashrc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now let\u2019s move on to the main commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress Core<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Checking the current WordPress version<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp core version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will display the current WordPress version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Updating WordPress<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp core update<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will update your version of WordPress to the latest available version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Backing Up the Database<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>wp db export<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command exports your WordPress database to an .sql file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Working with Media<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. List of image sizes<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp media image-size<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Importing media from local files<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp media import \/path\/to\/your\/image.jpg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command imports a media file from your local computer to your WordPress site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Regenerating Thumbnails<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When changing a WordPress theme, resizing thumbnails, or using optimization plugins, visitors may see \u201cdistorted\u201d images. In that case, you should regenerate the thumbnails\u2014that is, reset the image dimensions in the main WP settings. You can do this using special plugins (such as \u201cRegenerate Thumbnails\u201d), but using WP-CLI will be much faster since it isn\u2019t subject to HTTP limits and timeouts.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp media regenerate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command regenerates all thumbnails for your media files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Regenerating Thumbnails (Missing Only)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp media regenerate --only-missing<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will regenerate only the missing thumbnails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Deleting a media file<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp media delete &lt;id&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command deletes an image from the site by its ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Working with Plugins<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Searching for Plugins<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin search<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Searches the WordPress.org plugin directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Full List of Plugins<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command displays a list of plugins installed on the site, including their activation status, whether updates are available, and more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Updating Plugins<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin update --all<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will update all installed plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Installing a plugin<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Activating a plugin<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin activate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Installing and activating plugins<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install --activate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The latest version of the plugin from WordPress.org will be installed and activated immediately after installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Installing a Specific Version of a Plugin<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install --version=&lt;version&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deactivating a Plugin<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin deactivate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deleting a Plugin<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin delete<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">List of redirects<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>wp rewrite list --format=csv<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Mark a comment as spam \/ delete it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Mark a comment as spam<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp comment spam 1111<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace 1111 with the ID of the comment you want to mark as spam.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deleting one or more comments<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp comment delete 1111 2222<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example: if you need to delete several comments at once. Replace 1111 and 2222 with their respective IDs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Working with Posts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Opening a Post in a Text Editor<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp post edit 123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">123 \u2013 Post ID<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Creating a Post<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp post create --post_type=post --post_title=\u2018A sample post\u2019<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deleting a post<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp post delete 123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">123 \u2013 ID of the post you want to delete<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">In conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, you can do almost everything while using WP-CLI in WordPress. The possibilities are vast, and of course, we couldn\u2019t cover them all in this article.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If needed, refer to the official documentation. You can also get a list of all available commands by running `<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-highlight-color\">wp &#8211;help<\/mark>`.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WP-CLI (WP Command Line Interface) is a utility for managing WordPress sites that allows you to perform various administrative tasks directly from the command line.<\/p>\n","protected":false},"author":1,"featured_media":764,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides-how-tos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog\" \/>\n<meta property=\"og:description\" content=\"WP-CLI (WP Command Line Interface) is a utility for managing WordPress sites that allows you to perform various administrative tasks directly from the command line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Hostpro Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T10:46:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-06T10:47:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1290\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hostpro\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/hostpro.com\/blog\/#organization\",\"name\":\"Hostpro - Managed Web Hosting\",\"url\":\"https:\/\/hostpro.com\/blog\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/hostpro.com\/blog\/#logo\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2021\/08\/unnamed.jpg\",\"contentUrl\":\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2021\/08\/unnamed.jpg\",\"width\":900,\"height\":900,\"caption\":\"Hostpro - Managed Web Hosting\"},\"image\":{\"@id\":\"https:\/\/hostpro.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hostpro.com\/blog\/#website\",\"url\":\"https:\/\/hostpro.com\/blog\/\",\"name\":\"Hostpro Blog\",\"description\":\"Just another WordPress site\",\"publisher\":{\"@id\":\"https:\/\/hostpro.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hostpro.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png\",\"contentUrl\":\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png\",\"width\":1290,\"height\":506},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage\",\"url\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/\",\"name\":\"How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog\",\"isPartOf\":{\"@id\":\"https:\/\/hostpro.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage\"},\"datePublished\":\"2026-10-06T10:46:42+00:00\",\"dateModified\":\"2026-10-06T10:47:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hostpro.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install WP-CLI: A Quick Reference Guide to Basic Commands\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage\"},\"author\":{\"@id\":\"https:\/\/hostpro.com\/blog\/#\/schema\/person\/d47acffc4c46b925bda7fd78f5bbeb25\"},\"headline\":\"How to Install WP-CLI: A Quick Reference Guide to Basic Commands\",\"datePublished\":\"2026-10-06T10:46:42+00:00\",\"dateModified\":\"2026-10-06T10:47:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage\"},\"wordCount\":856,\"publisher\":{\"@id\":\"https:\/\/hostpro.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png\",\"articleSection\":[\"Guides &amp; How-tos\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/hostpro.com\/blog\/#\/schema\/person\/d47acffc4c46b925bda7fd78f5bbeb25\",\"name\":\"hostpro\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/hostpro.com\/blog\/#personlogo\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1bc22a9e14fbf4695e219bd195bd2e32d23a9f40920d686f1a99d9ae148597a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1bc22a9e14fbf4695e219bd195bd2e32d23a9f40920d686f1a99d9ae148597a6?s=96&d=mm&r=g\",\"caption\":\"hostpro\"},\"sameAs\":[\"https:\/\/hostpro.com\/blog\"],\"url\":\"https:\/\/hostpro.com\/blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/","og_locale":"en_GB","og_type":"article","og_title":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog","og_description":"WP-CLI (WP Command Line Interface) is a utility for managing WordPress sites that allows you to perform various administrative tasks directly from the command line.","og_url":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/","og_site_name":"Hostpro Blog","article_published_time":"2026-10-06T10:46:42+00:00","article_modified_time":"2026-10-06T10:47:41+00:00","og_image":[{"width":1290,"height":506,"url":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"hostpro","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/hostpro.com\/blog\/#organization","name":"Hostpro - Managed Web Hosting","url":"https:\/\/hostpro.com\/blog\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/hostpro.com\/blog\/#logo","inLanguage":"en-GB","url":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2021\/08\/unnamed.jpg","contentUrl":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2021\/08\/unnamed.jpg","width":900,"height":900,"caption":"Hostpro - Managed Web Hosting"},"image":{"@id":"https:\/\/hostpro.com\/blog\/#logo"}},{"@type":"WebSite","@id":"https:\/\/hostpro.com\/blog\/#website","url":"https:\/\/hostpro.com\/blog\/","name":"Hostpro Blog","description":"Just another WordPress site","publisher":{"@id":"https:\/\/hostpro.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostpro.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"ImageObject","@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage","inLanguage":"en-GB","url":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png","contentUrl":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png","width":1290,"height":506},{"@type":"WebPage","@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage","url":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/","name":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands - Hostpro Blog","isPartOf":{"@id":"https:\/\/hostpro.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage"},"datePublished":"2026-10-06T10:46:42+00:00","dateModified":"2026-10-06T10:47:41+00:00","breadcrumb":{"@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostpro.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands"}]},{"@type":"Article","@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#article","isPartOf":{"@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage"},"author":{"@id":"https:\/\/hostpro.com\/blog\/#\/schema\/person\/d47acffc4c46b925bda7fd78f5bbeb25"},"headline":"How to Install WP-CLI: A Quick Reference Guide to Basic Commands","datePublished":"2026-10-06T10:46:42+00:00","dateModified":"2026-10-06T10:47:41+00:00","mainEntityOfPage":{"@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#webpage"},"wordCount":856,"publisher":{"@id":"https:\/\/hostpro.com\/blog\/#organization"},"image":{"@id":"https:\/\/hostpro.com\/blog\/guides-how-tos\/how-to-install-wp-cli-a-quick-reference-guide-to-basic-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/hostpro.com\/blog\/wp-content\/uploads\/2026\/10\/24.01.2024-Banner-for-article-for-Wiki-How-to-install-WP-CLI.-1290x506-1.png","articleSection":["Guides &amp; How-tos"],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/hostpro.com\/blog\/#\/schema\/person\/d47acffc4c46b925bda7fd78f5bbeb25","name":"hostpro","image":{"@type":"ImageObject","@id":"https:\/\/hostpro.com\/blog\/#personlogo","inLanguage":"en-GB","url":"https:\/\/secure.gravatar.com\/avatar\/1bc22a9e14fbf4695e219bd195bd2e32d23a9f40920d686f1a99d9ae148597a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1bc22a9e14fbf4695e219bd195bd2e32d23a9f40920d686f1a99d9ae148597a6?s=96&d=mm&r=g","caption":"hostpro"},"sameAs":["https:\/\/hostpro.com\/blog"],"url":"https:\/\/hostpro.com\/blog"}]}},"_links":{"self":[{"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/posts\/759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/comments?post=759"}],"version-history":[{"count":2,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":765,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions\/765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/media\/764"}],"wp:attachment":[{"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostpro.com\/blog\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}