Skip to content

Studio CLI

The Studio CLI is a globally available command line interface (CLI) utility. It allows you to interact with various Studio features independently of the desktop application and to integrate Studio into scripting workflows.

Installation

Installing the CLI is a one-time operation that works differently depending on your operating system. Once installed, the CLI updates along with the Studio app, so there’s no need to install the CLI more than once.

macOS

  1. Open the main application menu.
  2. Click the “Install CLI…” option.
  3. You will be prompted for your account password, which is needed to complete the installation.
  4. After the installation finishes successfully, you can run the studio command in any terminal window.

Windows

Studio installs the CLI automatically after successfully updating to v1.5.0 or newer.

Usage

The Studio CLI is invoked with the studio command. It currently ships a set of commands related to preview sites:

  • studio preview create
  • studio preview update <host>
  • studio preview delete <host>
  • studio preview list

Creating, updating, and deleting preview sites requires you to be logged in to WordPress.com in Studio. If you’re not logged in, the CLI will give you an error message with a link to sign in when you run the command.

You can run these commands from the root directory of any Studio site. Local WordPress sites that haven’t already been added to Studio can also be used when creating or updating preview sites, as long as they have a working SQLite drop-in plugin (which is the default way of managing databases in Studio).

To run commands for another directory than your current one, pass the --path parameter and a path to the root directory of a Studio site.

The best way to explore the options available with each CLI command is to run studio --help in your terminal after installation. Pass the --help option to individual commands for instructions on using that specific command. 

Last updated: May 05, 2025