I installed and tried out using @wordpress/env and it amazed me how fast it performed and how easy it was to use!
It uses Docker, yet it was much faster than my simple Docker Compose v3 configuration. My current configuration makes product demos really rough with how slow it is to make requests (a common issue noted in the Docker community), experiences random cURL 28 timeout errors because of this, and causes WordPress itself to often randomly log network-related issues.
Including local environment configuration steps also makes the open source project way more portable and friendly to potential contributors or future teammates.
Also, lifecycle scripts are possible, described here: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#lifecycle-scripts Though I'd really want a script to run when the environment is first built (rather than afterStart) to use WP CLI to always create specific WordPress users, update options such as the site name, create some posts, etc... The docs don't immediately make it clear how to accomplish this...
I installed and tried out using
@wordpress/env
and it amazed me how fast it performed and how easy it was to use!It uses Docker, yet it was much faster than my simple Docker Compose v3 configuration. My current configuration makes product demos really rough with how slow it is to make requests (a common issue noted in the Docker community), experiences random cURL 28 timeout errors because of this, and causes WordPress itself to often randomly log network-related issues.
Anyways... The config documentation is here: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-json
Including local environment configuration steps also makes the open source project way more portable and friendly to potential contributors or future teammates.
Even better, include
wp-env
inpackage.json
so people don't even need to install the package on their machine globally. Details here: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#installation-as-a-local-packageAlso, lifecycle scripts are possible, described here: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#lifecycle-scripts Though I'd really want a script to run when the environment is first built (rather than
afterStart
) to use WP CLI to always create specific WordPress users, update options such as the site name, create some posts, etc... The docs don't immediately make it clear how to accomplish this...