[wp-trac] [WordPress Trac] #63564: Dev environment should incorporate enhancements from wp-env for speed and non-interactive usage

WordPress Trac noreply at wordpress.org
Fri Jun 13 16:32:42 UTC 2025


#63564: Dev environment should incorporate enhancements from wp-env for speed and
non-interactive usage
-------------------------------------+--------------------------
 Reporter:  westonruter              |       Owner:  westonruter
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  6.8.2
Component:  Build/Test Tools         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+--------------------------

Comment (by sandeepdahiya):

 Replying to [comment:4 SirLouen]:
 > Get the latest changes from `trunk` and pull them again before applying
 the patch.
 Thank you @SirLouen.

 In my case, the test results are:

 #Before-patch:
 {{{
 $ time npm run env:install

 > WordPress at 6.9.0 env:install
 > node ./tools/local-env/scripts/install.js

 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Generated 'wp-config.php' file.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with
 the raw value 'true'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Added the constant 'WP_DEBUG_LOG' to the 'wp-config.php' file
 with the raw value 'true'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-php-1    Running
 0.0s
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
 Success: Added the constant 'WP_DEBUG_DISPLAY' to the 'wp-config.php' file
 with the raw value 'true'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Added the constant 'SCRIPT_DEBUG' to the 'wp-config.php' file
 with the raw value 'true'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Added the constant 'WP_ENVIRONMENT_TYPE' to the 'wp-config.php'
 file with the value 'local'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Added the constant 'WP_DEVELOPMENT_MODE' to the 'wp-config.php'
 file with the value 'core'.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: Database reset.
 [+] Creating 2/2
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
  ✔ Container wordpress-develop-php-1    Running
 0.0s
 Success: WordPress installed successfully.

 real    0m29.395s
 user    0m0.212s
 sys     0m0.151s
 }}}

 #After-patch: (much cleaner and faster)

 {{{
 time npm run env:install

 > WordPress at 6.9.0 env:install
 > node ./tools/local-env/scripts/install.js

 Success: Generated 'wp-config.php' file.
 Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with
 the raw value 'true'.
 Success: Added the constant 'WP_DEBUG_LOG' to the 'wp-config.php' file
 with the raw value 'true'.
 Success: Added the constant 'WP_DEBUG_DISPLAY' to the 'wp-config.php' file
 with the raw value 'true'.
 Success: Added the constant 'SCRIPT_DEBUG' to the 'wp-config.php' file
 with the raw value 'true'.
 Success: Added the constant 'WP_ENVIRONMENT_TYPE' to the 'wp-config.php'
 file with the value 'local'.
 Success: Added the constant 'WP_DEVELOPMENT_MODE' to the 'wp-config.php'
 file with the value 'core'.
 Success: Database reset.
 Success: WordPress installed successfully.

 real    0m18.533s
 user    0m0.185s
 sys     0m0.167s
 }}}

 #Before-patch:


 {{{
 $ time npm run env:cli post list

 > WordPress at 6.9.0 env:cli
 > node ./tools/local-env/scripts/docker.js run --rm cli post list

 [+] Creating 2/2
  ✔ Container wordpress-develop-php-1    Running
 0.0s
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
 +----+--------------+-------------+---------------------+-------------+
 | ID | post_title   | post_name   | post_date           | post_status |
 +----+--------------+-------------+---------------------+-------------+
 | 1  | Hello world! | hello-world | 2025-06-13 15:38:57 | publish     |
 +----+--------------+-------------+---------------------+-------------+

 real    0m4.975s
 user    0m0.138s
 sys     0m0.152s
 }}}

 #After-patch:

 {{{
 $ time npm run env:cli post list

 > WordPress at 6.9.0 env:cli
 > node ./tools/local-env/scripts/docker.js exec cli wp --allow-root post
 list

 +----+--------------+-------------+---------------------+-------------+
 | ID | post_title   | post_name   | post_date           | post_status |
 +----+--------------+-------------+---------------------+-------------+
 | 1  | Hello world! | hello-world | 2025-06-13 16:01:46 | publish     |
 +----+--------------+-------------+---------------------+-------------+

 real    0m3.520s
 user    0m0.120s
 sys     0m0.137s
 }}}

 #Before-patch:

 {{{
 $ time npm --silent run env:cli option set blogname "My World"
 [+] Creating 2/2
  ✔ Container wordpress-develop-php-1    Running
 0.0s
  ✔ Container wordpress-develop-mysql-1  Running
 0.0s
 Error: Too many positional arguments: Develop


 real    0m5.503s
 user    0m0.165s
 sys     0m0.136s
 }}}

 #After-patch (argument passing was also successful):

 {{{
 time npm --silent run env:cli option set blogname "My World"
 Success: Value passed for 'blogname' option is unchanged.

 real    0m3.703s
 user    0m0.075s
 sys     0m0.167s
 }}}

 Its a lot nicer experience now. @westonruter appreciate the efforts.

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


More information about the wp-trac mailing list