[wp-trac] [WordPress Trac] #63543: Environment variable WP_CONFIG_PATH should be set on cli container in wordpress-develop env

WordPress Trac noreply at wordpress.org
Mon Jul 7 23:30:42 UTC 2025


#63543: Environment variable WP_CONFIG_PATH should be set on cli container in
wordpress-develop env
-------------------------------------------------+-------------------------
 Reporter:  westonruter                          |       Owner:
                                                 |  westonruter
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.8.2
Component:  Build/Test Tools                     |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-test-info fixed-major  |     Focuses:
  dev-reviewed                                   |
-------------------------------------------------+-------------------------
Changes (by westonruter):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60431" 60431]:
 {{{
 #!CommitTicketReference repository="" revision="60431"
 Build/Test Tools: Improve `env:install` command with better
 configurability and error handling.

 * Force WP-CLI to use the `wp-config.php` in the directory above the `src`
 directory via the `WP_CONFIG_PATH` environment variable [read by WP-
 CLI](https://github.com/wp-cli/wp-
 cli/blob/2800ad0a66747a826ae4221b2f022f1df6779cb6/php/utils.php#L328-L329)
 in the `wp_locate_config()` function.
 * Update the `env:install` command to write out the config at the repo
 root instead of writing it inside of the `ABSPATH` only then to move it
 one directory up.
 * Fix JSHint issues.
 * Add error handling to when `npm run env:install` is executed without
 having first done `npm run env:start`, in which case the script will end
 with an exit code of 1 and emit:

 > Error: It appears the development environment has not been started.
 Message: Timed out waiting for: tcp:localhost:8000
 > Did you forget to do 'npm run env:start'?

 Reviewed by audrasjb.
 Merges [60305] to the 6.8 branch.

 Fixes #63543.
 Props westonruter, jorbin, SirLouen.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63543#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list