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.
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
start a VIP Local Development Environment, and to run a WP-CLI command that generates dummy content.
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.
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
./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
~/.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 13, 2023