Skip to content

Advanced usage

The VIP Local Development Environment is built to be as identical to a VIP Platform environment as possible, and designed to allow for a wide variety of options needed in local development. Once a user gains familiarity with dev-env commands and options, more advanced techniques and customizations can be explored when working with a local environment.

Executing dev-env commands non-interactively

In some cases, there may be a need to execute one or more dev-env commands in a non-interactive mode. For example, executing a series of dev-env commands in a script to create and start a VIP Local Development Environment, and to run a WP-CLI command that generates dummy content.

Several dev-env subcommands such as create require user interaction to confirm option setting values. This can prevent a subcommand from completing as expected if it is executed non-interactively.

To successfully execute dev-env subcommands non-interactively, pass dev-env subcommands with < /dev/null. This will close the standard input and assign default values to any options that have not been explicitly defined in the executed command.

For example:

vip dev-env create --slug=example-site --multisite=y --php=8.0 < /dev/null

< /dev/null can also be passed when running a script that executes dev-env subcommands:

./example-script-that-creates-environment < /dev/null

On a machine running Windows OS, use < NUL instead. NUL is equivalent to /dev/null in Linux and macOS.

Global Lando config

The VIP Local Development Environment is powered by Lando, an open source software that abstracts some aspects of the Docker Compose application. VIP Local Development Environment is built to be as identical to a VIP Platform environment as possible, while still allowing for customization by developers.

If customization of the global Lando config is needed, users can add their own config.yml to ~/.local/share/vip/lando. Restart the local environment with vip dev-env start in order for the settings in the Lando config.yml to be applied.

Last updated: August 08, 2024

Relevant to

  • WordPress