Site icon Ryadel

Install WP-CLI on Windows - WordPress Command-Line Interface

10 Must-Have features for a WordPress Website in 2019

As you most likely already know, WP-CLI is the official command line tool for interacting with and managing your WordPress sites. It can be used for a number of different reasons, from installing and updating the WordPress core, to managing plugins and themes, and so on. In this brief tutorial we'll explain how to install the WP-CLI on Windows using two methods: composer or a phar+bat files combo.

Install using Composer

To install the WP-CLI using composer, we strongly suggest to read this official guide from make.wordpress.org.

Install using PHAR+BAT files

To install WP-CLI using a plain batch file, follow these steps:

  1. Make sure you have php installed and in your path so you can execute it globally.
  2. Download wp-cli.phar manually from here and save it to a folder, such as c:\wp-cli
  3. Create a file named wp.bat in c:\wp-cli with the following contents:

The last thing you need to do is to add c:\wp-cli to your path. You can either do that from the Command Panel (System > Advanced) or by executing the following CMD:

You can now use WP-CLI from anywhere in Windows command line.

 

Exit mobile version