{"id":3291,"date":"2017-12-21T23:22:00","date_gmt":"2017-12-21T23:22:00","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2017\/12\/21\/install-and-configure-wp-cli\/"},"modified":"2025-04-23T10:41:54","modified_gmt":"2025-04-23T14:41:54","slug":"install-and-configure-wp-cli","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/","title":{"rendered":"Install and Configure WP-CLI"},"content":{"rendered":"\n<div class=\"in_this_tutorial\">\n<h2>In this tutorial:<\/h2>\n<p><a class=\"btn btn-primary\" href=\"#install-wp-cli\" type=\"button\">Install WP-CLI<\/a> <a class=\"btn btn-primary\" href=\"#tab-completion-wp-cli\" type=\"button\">Setup Bash Tab-to-Complete<\/a><\/p>\n<\/div>\n\n\n\n<p><strong>WP-CLI<\/strong> or <em>WordPress Command Line Interface<\/em> is a suite of commands that can make quick work out of updating plugins, setting up multisites, and much more WordPress management tasks, right from the Command Line Interface (CLI).<\/p>\n\n\n\n<div class=\"alert alert-success\"><b>NOTE: <\/b>InMotion Hosting&#8217;s <a href=\"https:\/\/inmotionhosting.com\/wordpress-hosting\">WordPress Hosting<\/a> includes WP-CLI and is already installed. If you are already familiar with working in a Command Line Interface (CLI), check out our <a title=\"Click here to navigate to our WP-CLI Education Channel to learn more commands available using WP-CLI.\" href=\"\/support\/edu\/wordpress\/wp-cli\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP-CLI Education Channel<\/a> to learn about the commands available using WP-CLI.<\/div>\n\n\n\n<p><a name=\"install-wp-cli\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Prerequisites for WP-CLI<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Before we dive into installing WP-CLI, let\u2019s make sure you\u2019ve got everything you need to get started:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>PHP version:<\/b><span style=\"font-weight: 400;\"> First up, you\u2019ll need PHP installed on your server, as WP-CLI is built to work with WordPress, which runs on PHP. Specifically, you\u2019ll want PHP 7.4 or higher &#8211; this keeps things compatible and secure. If you\u2019re unsure about your PHP version, a quick check with your hosting provider or a command like php -v in your terminal will clear things up.<\/span><\/li>\n\n\n\n<li><b>SSH access:<\/b><span style=\"font-weight: 400;\"> You\u2019ll need SSH access to your server to run WP-CLI commands. Most hosting providers, like InMotion Hosting, offer this\u2014double-check with your host to ensure you\u2019ve got the credentials handy.<\/span><\/li>\n\n\n\n<li><b>WordPress installation:<\/b><span style=\"font-weight: 400;\"> Another key requirement is WordPress itself. WP-CLI is designed to manage WordPress sites, so you\u2019ll need at least one WordPress installation ready to go. WP-CLI works with WordPress 3.7 or higher, but we recommend using a recent version for security and performance reasons.<\/span><\/li>\n\n\n\n<li><b>cURL and wget:<\/b><span style=\"font-weight: 400;\"> These tools are usually pre-installed on most servers, but WP-CLI may use them for downloading files. Run curl&#8211; version or wget&#8211; version to confirm they\u2019re available.<\/span><\/li>\n\n\n\n<li><b>Sufficient permissions:<\/b><span style=\"font-weight: 400;\"> Make sure your user account has the necessary permissions to execute commands and modify WordPress files on the server.<\/span><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install WordPress WP-CLI<\/h2>\n\n\n\n<div class=\"alert alert-danger\"><b>NOTE: <\/b>The following instructions require <a title=\"Click here to navigate to our guide and learn what root access is and how to obtain root access yourself.\" href=\"\/support\/amp\/obtain-root-access\/\" target=\"_blank\" rel=\"noopener noreferrer\">root access<\/a> available on a <a title=\"Click here to navigate to our main site and learn about the VPS hosting plans available.\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\" target=\"_blank\" rel=\"noopener noreferrer\">VPS<\/a> or <a title=\"Click here to navigate to our main site and learn about the Dedicated Server hosting plans available.\" href=\"https:\/\/www.inmotionhosting.com\/dedicated-servers\" target=\"_blank\" rel=\"noopener noreferrer\">Dedicated Server<\/a>.<\/div>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/how-to-login-ssh\/\" target=\"_blank\" rel=\"noopener noreferrer\">SSH into your server<\/a> as the <b>root<\/b> user.<\/li>\n\n\n\n<li>You will need to download <a title=\"Click here to download wp-cli.phar from GitHub\" href=\"https:\/\/raw.github.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar\" target=\"_blank\" rel=\"noopener noreferrer\">wp-cli.phar<\/a> using either <b>wget<\/b> or <b>curl<\/b>.<br><p><span class=\"cli\">curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/span><\/p><br><p>or<\/p><br><p><span class=\"cli\">wget https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/span><\/p><br><div class=\"alert alert-danger\"><br><p><b>NOTE: <\/b>Using <i>wget<\/i>, if you get an error about the SSL certificate mis-match between <i>www.github.com<\/i> and <i>raw.githubusercontent.com<\/i> domains, you can skip the certificate check to download the file with:<\/p><br><p><span class=\"cli\">wget <span style=\"color: red;\">&#8211;no-check-certificate<\/span> https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/span><\/p><br><\/div><br><\/li>\n\n\n\n<li>Then test WP-CLI directly with PHP with this command:<br><p><span class=\"cli\">php wp-cli.phar &#8211;info<\/span><\/p><br><p>You should see output similar to:<\/p><br><pre class=\"cli\">PHP binary:  \/opt\/cpanel\/ea-php70\/root\/usr\/bin\/php PHP version:  7.0.26 php.ini used: \/opt\/cpanel\/ea-php70\/root\/etc\/php.ini WP-CLI root dir:  phar:\/\/wp-cli.phar WP-CLI packages dir:   WP-CLI global config:  WP-CLI project config:   WP-CLI version: 0.24.1<\/pre><br><\/li>\n\n\n\n<li>Next you&#8217;ll need to make the WP-CLI file executable and <a href=\"\/support\/server\/linux\/mv-command\/\" target=\"_blank\" rel=\"noopener noreferrer\">move<\/a> it to your path:<br><p><span class=\"cli\">chmod +x wp-cli.phar<\/span><\/p><br><p><span class=\"cli\">mv wp-cli.phar \/usr\/local\/bin\/wp<\/span><\/p><br><\/li>\n\n\n\n<li>Now you can simply use <i>wp<\/i> at the command line to access WP-CLI:<br><p><span class=\"cli\">wp &#8211;info<\/span><\/p><br><\/li>\n<\/ol>\n\n\n\n<p><a name=\"tab-completion-wp-cli\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set up Bash Tab-to-Complete for WP-CLI<\/h2>\n\n\n\n<p>A great time-saving feature of command line interfaces is using tab completion to quickly type in commands. You can add the ability to use tab completion for WP-CLI by setting it up in your local <i>~\/.bash_profile<\/i> file.<\/p>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li><a title=\"Click here to navigate to our guide and learn how to SSH into your server.\" href=\"\/support\/server\/ssh\/how-to-login-ssh\/\" target=\"_blank\" rel=\"noopener noreferrer\">SSH into your server<\/a> as the user that will be using WP-CLI.<\/li>\n\n\n\n<li>Download the WP-CLI tab completion file to your server.<br><p><span class=\"cli\">curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/wp-cli\/master\/utils\/wp-completion.bash<\/span><\/p><br><p>or<\/p><br><p><span class=\"cli\">wget https:\/\/raw.githubusercontent.com\/wp-cli\/wp-cli\/master\/utils\/wp-completion.bash<\/span><\/p><br><div class=\"alert alert-danger\"><b>NOTE: <\/b>While using <i>wget<\/i>, if you get an error about the SSL certificate mis-match between <i>www.github.com<\/i> and <i>raw.githubusercontent.com<\/i> domains, you can skip the certificate check to download the file with:<br><p><span class=\"cli\">wget <span style=\"color: red;\">&#8211;no-check-certificate<\/span> https:\/\/raw.githubusercontent.com\/wp-cli\/wp-cli\/master\/utils\/wp-completion.bash<\/span><\/p><br><\/div><br><\/li>\n\n\n\n<li>Move the WP-CLI tab completion file to your home directory:<br><p><span class=\"cli\">mv wp-completion.bash ~\/<\/span><\/p><br><\/li>\n\n\n\n<li>Now edit your <i>~\/.bash_profile<\/i> file to include the WP-CLI tab completion file:<br><p><span class=\"cli\">vi ~\/.bash_profile<\/span><\/p><br><\/li>\n\n\n\n<li>Add this line to the bottom of your <i>~\/.bash_profile<\/i> file:<br><p><span class=\"cli\">source ~\/wp-completion.bash<\/span><\/p><br><p>Now save this file.<br><span style=\"color: initial;\">To verify that WP-CLI is installed correctly, you can run the command: wp &#8211;info. This will display environment-specific information about WP-CLI, including the version, PHP version, WordPress version, and system details.\u00a0<br>Example of WP-CLI <code>wp --info<\/code> Output:<\/span><\/p><code>OS: Linux 5.15.0-105-generic #115-Ubuntu SMP x86_64<br>Shell: \/bin\/bash<br>PHP binary: \/usr\/bin\/php<br>PHP version: 8.1.2<br>php.ini used: \/etc\/php\/8.1\/cli\/php.ini<br>WP-CLI root dir: phar:\/\/wp-cli.phar\/vendor\/wp-cli\/wp-cli<br>WP-CLI version: 2.9.0<\/code><br><p><span style=\"color: initial;\"><\/span><\/p><\/li>\n\n\n\n<li>Back at the command line, make sure to source your <i>~\/.bash_profile<\/i> file by running this command:<br><p><span class=\"cli\">source ~\/.bash_profile<\/span><\/p><br><\/li>\n\n\n\n<li>Now just type <i>wp<\/i> at the prompt, and hit <i>Tab<\/i> twice to see all the tab completions you just set up:<br><pre class=\"cli\">exampl3@server [\/home\/exampl3\/public_html]# wp<br>cache\u00a0\u00a0comment\u00a0\u00a0eval\u00a0\u00a0help\u00a0\u00a0menu\u00a0\u00a0plugin\u00a0\u00a0role\u00a0\u00a0shell\u00a0\u00a0super-admin\u00a0\u00a0transient<br>cap\u00a0\u00a0core\u00a0\u00a0eval-file\u00a0\u00a0import\u00a0\u00a0network\u00a0\u00a0post\u00a0\u00a0scaffold\u00a0\u00a0sidebar\u00a0\u00a0term\u00a0\u00a0user\u00a0\u00a0cli<br>db\u00a0\u00a0export\u00a0\u00a0media\u00a0\u00a0option\u00a0\u00a0rewrite\u00a0\u00a0search-replace\u00a0\u00a0site\u00a0\u00a0theme\u00a0\u00a0widget<\/pre><br><\/li>\n<\/ol>\n\n\n\n<p>Now that you have installed WP-CLI you can begin using the command line to manage your WordPress website(s).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring Your Command-line Interface<\/h2>\n\n\n\n<p>If you&#8217;re regularly working with WordPress via the command line, you\u2019ve probably found yourself typing the same flags or options over and over. It can get tedious, and that&#8217;s where the WP-CLI configuration file, wp-cli.yml, comes in.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is wp-cli.yml?<\/strong><\/h3>\n\n\n\n<p>The wp-cli.yml file is a simple YAML configuration file that lets you define default options and settings for your WP-CLI commands. Instead of repeating the same parameters, you set them once and forget them. WP-CLI reads this file automatically. Thus, it saves you time and reduces human error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Use a Configuration File?<\/strong><\/h3>\n\n\n\n<p>Imagine you&#8217;re always running wp core update with &#8211;path=\/var\/www\/html\/mysite. Instead of typing that every single time, you can store it in your wp-cli.yml file like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>path: \/var\/www\/html\/mysite<\/li>\n<\/ul>\n\n\n\n<p>Now, every WP-CLI command you run from that directory will default to that path\u2014no extra typing needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to create a wp-cli.yml file?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Choose a location:<\/strong> WP-CLI supports multiple levels of config files, so you can create one in:\n<ul class=\"wp-block-list\">\n<li>The current working directory (for project-specific settings)<\/li>\n\n\n\n<li>Your home directory (~\/.wp-cli\/config.yml for global settings)<\/li>\n\n\n\n<li>Inside the WordPress root directory<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Create the file<\/strong>: Use any text editor to create a file called wp-cli.yml. Here\u2019s a basic example:\n<ul class=\"wp-block-list\">\n<li>path: \/var\/www\/html\/mysite<\/li>\n\n\n\n<li>url: https:\/\/mysite.com<\/li>\n\n\n\n<li>user: admin<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Save it and test<\/strong>: Once saved, WP-CLI will automatically read the file. Try running a command like wp plugin list without specifying the path or URL &#8211; it\u2019ll just work.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Useful Command Tips<\/strong><\/h2>\n\n\n\n<p>Tired of digging through documentation or typing long commands? Here&#8217;s a list of the most essential WP-CLI commands every WordPress developer should have in their toolkit.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Core management:<\/strong>\n<ul class=\"wp-block-list\">\n<li>wp core version &#8211; quickly see installed WP version<\/li>\n\n\n\n<li>wp core update &#8211; update WordPress core to latest<\/li>\n\n\n\n<li>wp core install &#8211; install WP with URL, title, admin creds<\/li>\n\n\n\n<li>wp core verify-checksums &#8211; check if core files were modified<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Plugin\/theme management:<\/strong>\n<ul class=\"wp-block-list\">\n<li>wp plugin list &#8211; view all plugins and their status<\/li>\n\n\n\n<li>wp plugin install plugin-slug &#8211;activate &#8211; install &amp; activate in one go<\/li>\n\n\n\n<li>wp plugin update &#8211;all &#8211; update every plugin at once<\/li>\n\n\n\n<li>wp theme install theme-slug &#8211;activate &#8211; install and activate a theme<\/li>\n\n\n\n<li>wp theme update &#8211;all &#8211; update all themes<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>User management:<\/strong>\n<ul class=\"wp-block-list\">\n<li>wp user list &#8211; list all users with roles and IDs<\/li>\n\n\n\n<li>wp user create username email@example.com &#8211;role=editor &#8211; add a new user<\/li>\n\n\n\n<li>wp user update 2 &#8211;user_pass=newpassword &#8211; reset user password<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Database operations:<\/strong>\n<ul class=\"wp-block-list\">\n<li>wp db export &#8211; quick backup of your database<\/li>\n\n\n\n<li>wp db import file.sql &#8211; restore from a SQL file<\/li>\n\n\n\n<li>wp db query &#8220;SELECT * FROM wp_users;&#8221; &#8211; run raw SQL<\/li>\n\n\n\n<li>wp search-replace &#8216;oldurl.com&#8217; &#8216;newurl.com&#8217; &#8211; find &amp; replace across DB<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>Updating WP-CLI<\/strong>&nbsp;<\/h1>\n\n\n\n<p>Update WP-CLI by running wp cli update in your terminal. Ensure you have proper permissions or use sudo if needed.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Troubleshooting WP-CLI<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Permission Issues in Shared Hosting<\/strong><\/h3>\n\n\n\n<p><a href=\"\/shared-hosting\">Shared hosting<\/a> environments often impose strict permissions, which can cause WP-CLI to fail. Common issues include a lack of write access to WordPress directories or restricted shell access.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure the WordPress directory has the correct file permissions (755 for directories, 644 for files). If necessary, adjust them using FTP or a file manager.<\/li>\n\n\n\n<li>The user running WP-CLI should have the same ownership as the WordPress files. If not, contact your hosting provider to correct ownership or grant necessary permissions.<\/li>\n\n\n\n<li>Some shared hosting environments restrict shell access. If needed, request SSH access from your hosting provider to use WP-CLI effectively.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. PHP Version Compatibility Problems<\/strong><\/h3>\n\n\n\n<p>WordPress and WP-CLI require a minimum PHP version to work correctly. Sometimes, your host may run an outdated PHP version, which causes compatibility problems with WordPress or WP-CLI commands.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run php -v from the command line to <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-view-your-php-version-in-cpanel\/\">verify your PHP version<\/a>. WordPress typically requires PHP 7.4 or higher.<\/li>\n\n\n\n<li>If you have control over your hosting environment (e.g., <a href=\"\/vps-hosting\">VPS<\/a>), <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-upgrade-php-version\/\">upgrade your PHP version<\/a>. For shared hosting, <a href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/how-to-get-great-technical-support\/\">contact your provider<\/a> to request an upgrade to the necessary PHP version.<\/li>\n\n\n\n<li>WP-CLI also requires a minimum PHP version. If needed, update WP-CLI using the command wp cli update.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Working with WP-CLI When You Don&#8217;t Have Root Access<\/strong><\/h3>\n\n\n\n<p>If you are using a shared hosting environment, you may not have <a href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/obtain-root-access\/https:\/\/www.inmotionhosting.com\/support\/amp\/obtain-root-access\/\">root access<\/a> to install or configure WP-CLI globally. This can limit your ability to use certain WP-CLI features.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can install WP-CLI locally within your WordPress directory by downloading the wp-cli.phar file. To do this:\n<ul class=\"wp-block-list\">\n<li>Download the WP-CLI PHAR file:<br>curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/li>\n\n\n\n<li>Make it executable:<br>chmod +x wp-cli.phar<\/li>\n\n\n\n<li>Move it to a directory included in your system&#8217;s PATH:<br>sudo mv wp-cli.phar \/usr\/local\/bin\/wp<\/li>\n\n\n\n<li>If you can&#8217;t use sudo, simply run it as php wp-cli.phar from within your WordPress directory.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>If you&#8217;re working on a shared host and don&#8217;t have root access, create custom shell scripts to automate your WP-CLI tasks. Just make sure you have access to execute PHP scripts and that the correct permissions are set.<\/li>\n<\/ul>\n\n\n<p>Learn more about <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/\">WP-CLI<\/a>, the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Advanced Use for Command Line Interface and WordPress<\/h2>\n\n\n\n<p>WordPress CLI (WP-CLI) is an incredibly powerful tool for developers who want to streamline their workflow, automate repetitive tasks, and integrate with various systems. Here\u2019s an advanced look at using WP-CLI<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Integration with development workflows<\/strong>: WP-CLI integrates into CI\/CD pipelines for automated testing, deployment, and site management, speeding up the development lifecycle.<\/li>\n\n\n\n<li><strong>Using WP-CLI with version control<\/strong>: Combine WP-CLI with Git to manage theme\/plugin updates and configurations, allowing for streamlined version control and collaboration.<\/li>\n\n\n\n<li><strong>Performance optimizations for large sites<\/strong>: Use WP-CLI to manage large datasets, clear caches, optimize databases, and batch processing tasks, improving speed.<\/li>\n\n\n\n<li><strong>Scheduled tasks and automation<\/strong>: WP-CLI can automate tasks like backups and updates using cron jobs for recurring maintenance.<\/li>\n\n\n\n<li><strong>Multisite management commands<\/strong>: WP-CLI simplifies multisite network management by enabling commands for creating, updating, and managing multiple sites at once.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial: Install WP-CLI Setup Bash Tab-to-Complete WP-CLI or WordPress Command Line Interface is a suite of commands that can make quick work out of updating plugins, setting up multisites, and much more WordPress management tasks, right from the Command Line Interface (CLI). NOTE: InMotion Hosting&#8217;s WordPress Hosting includes WP-CLI and is already installed.<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\"> Read More ><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4374],"tags":[],"class_list":["post-3291","post","type-post","status-publish","format-standard","hentry","category-wp-cli"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Install and Configure WP-CLI | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this guide, you will learn how to install WP-CLI and configure the &quot;Tab to auto-complete&quot; option to efficiently maintain your WordPress website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install and Configure WP-CLI | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this guide, you will learn how to install WP-CLI and configure the &quot;Tab to auto-complete&quot; option to efficiently maintain your WordPress website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-21T23:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-23T14:41:54+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\"},\"headline\":\"Install and Configure WP-CLI\",\"datePublished\":\"2017-12-21T23:22:00+00:00\",\"dateModified\":\"2025-04-23T14:41:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\"},\"wordCount\":1754,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"WP-CLI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\",\"name\":\"Install and Configure WP-CLI | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2017-12-21T23:22:00+00:00\",\"dateModified\":\"2025-04-23T14:41:54+00:00\",\"description\":\"In this guide, you will learn how to install WP-CLI and configure the \\\"Tab to auto-complete\\\" option to efficiently maintain your WordPress website.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install and Configure WP-CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install and Configure WP-CLI | InMotion Hosting","description":"In this guide, you will learn how to install WP-CLI and configure the \"Tab to auto-complete\" option to efficiently maintain your WordPress website.","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:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/","og_locale":"en_US","og_type":"article","og_title":"Install and Configure WP-CLI | InMotion Hosting","og_description":"In this guide, you will learn how to install WP-CLI and configure the \"Tab to auto-complete\" option to efficiently maintain your WordPress website.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2017-12-21T23:22:00+00:00","article_modified_time":"2025-04-23T14:41:54+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b"},"headline":"Install and Configure WP-CLI","datePublished":"2017-12-21T23:22:00+00:00","dateModified":"2025-04-23T14:41:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/"},"wordCount":1754,"commentCount":7,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["WP-CLI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/","name":"Install and Configure WP-CLI | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2017-12-21T23:22:00+00:00","dateModified":"2025-04-23T14:41:54+00:00","description":"In this guide, you will learn how to install WP-CLI and configure the \"Tab to auto-complete\" option to efficiently maintain your WordPress website.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-and-configure-wp-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Install and Configure WP-CLI"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4374,"name":"WP-CLI","slug":"wp-cli","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3291"}],"version-history":[{"count":6,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3291\/revisions"}],"predecessor-version":[{"id":129932,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3291\/revisions\/129932"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}