Skip to content

Basic usage

Available commands for the VIP Local Development Environment and their options can be reviewed by running vip dev-env --help (or -h).

Retrieve information about a local environment

After a VIP Local Development Environment is created, information about the environment will be automatically output after the completion of commands such as createstart, update, and stop.

Information about an environment can be retrieved on demand with the command: vip dev-env info [options].

Information output:

  • SLUG: The value assigned to the --slug option
  • LOCATION: Path to the local environment on the local machine(e.g. /Users/user-name/.local/share/vip/dev-environment/example-site)
  • SERVICES: A list of available services provisioned in the local environment (e.g. Search Dev Tools, NGINX, PHP, database, Memcached, Elasticsearch, WordPress, vip-mu-plugins, demo-app-code)
  • NGINX URLS: URLs for accessing a running local environment in a browser (e.g. http://example-site.vipdev.lndo.site/)
  • STATUS: State of the local environment (e.g., UP , DOWN)
  • LOGIN URL: Automatically log in to the WordPress Admin dashboard with the default credentials by loading this generated URL value in a browser window.
  • DEFAULT USERNAME:  vipgo                                                                          
  • DEFAULT PASSWORD:  password 

Default WordPress login credentials

By default, a newly created local environment supplies a default WordPress user account with an Administrator role for WordPress single site and a Super Admin role for WordPress multisite installations.

Once a local environment is in an UP state, the WordPress Admin dashboard can be accessed by appending the output NGINX URLS value with /wp-admin/.

For example: http://example-site.vipdev.lndo.site/wp-admin/

Default username: vipgo
Default password: password

Users can optionally be auto-logged into the WordPress Admin dashboard with the default credentials by loading the generated LOGIN URL value into a browser window.

Setup wizard

When a vip dev-env create or a vip dev-env update command is run, a command line setup wizard will appear and ask a user to confirm settings for all other environment options that were not set in the command.

For example, by including --multisite=y in the vip dev-env create command, the setup wizard will skip the “Multisite (y/N)” option, but will ask a user to confirm other environment settings (e.g., “WordPress site title“, “WordPress version“).

An example command that sets multiple option values:

vip dev-env create --title="WPVIP Dev" --multisite=y --php=8.0 --mu-plugins="~/vipdev/vip-go-mu-plugins" --app-code="~/vipdev/vip-go-skeleton" --slug=example-site

Setting options in the setup wizard:

  • WordPress site title · Select the Enter or Return key to accept the default value “VIP Dev”, or type a new custom value and then select the Enter or Return key to proceed to the next option.
  • Multisite (y/N) · Select the Enter or Return key to accept the default value “False”, or type “y” to create a WordPress multisite local environment.
  • PHP version to use · Select the Enter or Return key to accept the default version, or use the Down Arrow or Up Arrow to highlight the desired version and then select the Enter or Return key to proceed to the next option.
  • WordPress – Which version would you like · Select the Enter or Return key to accept the highlighted default version, or use the Down Arrow or Up Arrow to highlight the desired version and then select the Enter or Return key to proceed to the next option.
  • How would you like to source vip-go-mu-plugins · Select the Enter or Return key to accept the default value “Demo”. This will automatically load the production branch of VIP MU plugins on the created local environment.
  • How would you like to source application-code · Use the Down Arrow to highlight the “Demo” option and run the local environment with a default, uneditable codebase. Or, select the default setting “local folder” to configure the local environment to load an application’s wpcomvip GitHub repository that has been git cloned to the local machine. Select the Enter or Return key to proceed to the next option.
  • Enable Elasticsearch (needed by Enterprise Search)? (y/N) · Select the Enter or Return key to accept the default value “false”, or type “y” to enable Elasticsearch for the local environment.
  • Enable phpMyAdmin (y/N) · Select the Enter or Return key to accept the default value “false”, or type “y” to enable phpMyAdmin for the local environment.
  • Enable XDebug (y/N) · Select the Enter or Return key to accept the default value “false”, or type “y” to enable XDebug for the local environment.
  • Enable Mailpit (y/N) · Select the Enter or Return key to accept the default value “false”.
  • Enable Photon (y/N) · Select the Enter or Return key to accept the default value “false”.

Executing CLI commands

Execute commands against the local environment’s containers (as opposed to the host machine) with the command: vip dev-env exec [options]. Separate the arguments of the vip process and the command to be executed with -- (two standard hyphens).

For example, to run the WP-CLI command wp post list against the WordPress site in the running local environment:

vip --slug=example-site dev-env exec -- wp post list

Because commands run with exec -- are running inside the local environment’s containers and not the host machine, paths to local files on the host machine might not work as expected.

Last updated: December 26, 2023

Relevant to

  • WordPress