Skip to content

Commit bee9829

Browse files
authored
Merge pull request #547 from wp-cli/fix/early-require
Document `WP_CLI_EARLY_REQUIRE` environment variable
2 parents 3c0c59b + dc368c8 commit bee9829

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

β€Žconfig.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ WP-CLI's behavior can be changed at runtime through the use of environment varia
373373
* `WP_CLI_STRICT_ARGS_MODE` - Avoid ambiguity by telling WP-CLI to treat any arguments before the command as global, and after the command as local.
374374
* `WP_CLI_SUPPRESS_GLOBAL_PARAMS` - Set to `true` to skip showing the global parameters at the end of the help screen. This saves screen estate for advanced users.
375375
* `WP_CLI_FORCE_USER_LOGIN` - Set to `1` to force the value provided to the `--user` flag to be interpreted as a login instead of an ID, to get around ambiguous types.
376+
* `WP_CLI_EARLY_REQUIRE` - Load a custom PHP file early on in the bootstrap process.
376377

377378
To set an environment variable on demand, simply place the environment variable definition before the WP-CLI command you mean to run.
378379

β€Žtroubleshooting.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ If you want to run WP-CLI remotely using SSH, it is required that the command `w
3737
* `WP_CLI_PHP_ARGS` – Arguments to pass to the PHP binary when invoking WP-CLI (only works for non-Phar installation).
3838
* `WP_CLI_SSH_PRE_CMD` – When using `--ssh=<ssh>`, perform a command before WP-CLI calls WP-CLI on the remote server.
3939
* `WP_CLI_STRICT_ARGS_MODE` – Avoid ambiguity by telling WP-CLI to treat any arguments before the command as global, and after the command as local.
40+
* `WP_CLI_EARLY_REQUIRE` - Load a custom PHP file early on in the bootstrap process.
4041

4142
To set an environment variable on demand, you can place the environment variable definition before the WP-CLI command you mean to run (e.g. `EDITOR=vim wp post edit 1`); to overwrite environment variables, use `export VARIABLE=value` in your `~/.bashrc` or `~.zhsrc`.
4243

0 commit comments

Comments
Β (0)