Always require a specific file when running WP-CLI

Add a require statement to one of WP-CLI's supported configuration files.

WP-CLI can read default options from a few configuration file types (when present):

  1. wp-cli.local.yml file inside the current working directory (or upwards).
  2. wp-cli.yml file inside the current working directory (or upwards).
  3. ~/.wp-cli/config.yml file (path can be changed by setting the WP_CLI_CONFIG_PATH environment variable).

To always require a specific file when running WP-CLI, you can include a require statement in one of the aforementioned configuration files like so:

require:
  - path/to/file.php

Learn more about WP-CLI’s config system on the WP-CLI website.