From a2be98014f012f574b66cc3ea06829e6101b101a Mon Sep 17 00:00:00 2001 From: Kamran Abdul Aziz Date: Sun, 1 Nov 2026 20:42:37 +0530 Subject: [PATCH] Document four missing environment variables in the config reference WP-CLI 2.12.0 reads WP_CLI_ALLOW_ROOT, WP_CLI_AUTO_CHECK_UPDATE_DAYS, WP_CLI_CACHE_EXPIRY and WP_CLI_CACHE_MAX_SIZE, but the environment variable list in the Config reference does not mention them. --- references/config.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/references/config.md b/references/config.md index a09d1f39..aab3b1b8 100644 --- a/references/config.md +++ b/references/config.md @@ -362,7 +362,11 @@ If you are still using WP-CLI v2.6.0 but you want to use the default of `--conte WP-CLI's behavior can be changed at runtime through the use of environment variables: +* `WP_CLI_ALLOW_ROOT` - Set to `1` to let WP-CLI run as the root user without adding `--allow-root` to every command. +* `WP_CLI_AUTO_CHECK_UPDATE_DAYS` - Number of days between automatic checks for updates. Default is `1`. * `WP_CLI_CACHE_DIR` - Directory to store the WP-CLI file cache. Default is `~/.wp-cli/cache/`. +* `WP_CLI_CACHE_EXPIRY` - Time in seconds after which files in the WP-CLI file cache expire and are removed. Default is `15552000` (180 days). +* `WP_CLI_CACHE_MAX_SIZE` - Maximum size of the WP-CLI file cache in bytes. WP-CLI periodically trims the cache to this size, removing the least recently accessed files first. Default is `314572800` (300 MB). * `WP_CLI_CONFIG_PATH` - Path to the global `config.yml` file. Default is `~/.wp-cli/config.yml`. * `WP_CLI_CUSTOM_SHELL` - Allows the user to override the default `/bin/bash` shell used. * `WP_CLI_DISABLE_AUTO_CHECK_UPDATE` - Disable WP-CLI automatic checks for updates.