Skip to content

Commit e825002

Browse files
ayushpahwaclaude
andcommitted
Replace Docker Compose with wp-env for local development
- Add .wp-env.json configuration (port 8887, PHP 8.1, WooCommerce + WordPress Importer) - Update package.json: `up`/`down` now use wp-env, add `wp-env:clean` command - Remove Docker Compose setup files (docker-compose.yml, default.env, bin/docker-setup.sh) - Remove docker-compose specific files (Dockerfiles, mu-plugins, php.ini) - Keep docker/bin/ for Jurassic Tube tunnel scripts - Update README.md with simplified wp-env instructions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cb0aa0a commit e825002

File tree

12 files changed

+34
-308
lines changed

12 files changed

+34
-308
lines changed

.wp-env.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"core": null,
3+
"phpVersion": "8.1",
4+
"port": 8887,
5+
"plugins": [
6+
"https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip",
7+
"https://downloads.wordpress.org/plugin/wordpress-importer.latest-stable.zip",
8+
"."
9+
],
10+
"config": {
11+
"WP_DEBUG": true,
12+
"WP_DEBUG_LOG": true,
13+
"SCRIPT_DEBUG": true,
14+
"JETPACK_DEV_DEBUG": true,
15+
"WOOCOMMERCE_CONNECT_FREQUENT_FETCH": true,
16+
"WOOCOMMERCE_CONNECT_DEV_SERVER_URL": "http://localhost:8085/"
17+
}
18+
}

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,19 @@ If you'd just like to check out the latest code and/or wish to contribute code,
3131
* Clone this repository into the `plugins` folder of the WordPress installation.
3232
* This project uses [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules). You'll need to run `git submodule update --init`, or enable `submodule.recurse` ([#](https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulerecurse)) like this: `git config --global submodule.recurse true`
3333
* Run `npm install && composer install` to set up all the dependencies
34-
* You now have two choices:
35-
* For Development: run `npm run up`, let the process finish, connect your site to Jetpack using Jurassic Tube or ngrok.
36-
* For testing or pre-production use: Run `npm run dist` which will build the files into the `dist` folder, and will be loaded by the plugin without any additional configuration
34+
* For local development:
35+
1. Install [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) globally: `npm install -g @wordpress/env`
36+
2. Start the environment: `npm run up` (starts wp-env on port 8887)
37+
3. In another terminal, start the dev server: `npm run start` (webpack dev server on port 8085)
38+
4. Access your site at `http://localhost:8887` (admin: `admin` / `password`)
39+
5. Connect to Jetpack using Jurassic Tube (`npm run tube:setup` then `npm run tube:start`) or ngrok
40+
41+
The `.wp-env.json` configuration automatically:
42+
- Installs WooCommerce and WordPress Importer plugins
43+
- Enables debug mode and script debugging
44+
- Configures the dev server URL for hot reloading
45+
46+
* For testing or pre-production use: Run `npm run dist` which will build the files into the `dist` folder, and will be loaded by the plugin without any additional configuration
3747

3848
*note*: if `npm install` gets stuck, you may have to update your GitHub urls in your git config. Use this command to fix it:
3949

bin/docker-setup.sh

Lines changed: 0 additions & 138 deletions
This file was deleted.

default.env

Lines changed: 0 additions & 13 deletions
This file was deleted.

docker-compose.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

docker/bin/.gitkeep

Whitespace-only changes.

docker/mu-dev.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

docker/mu-wccon-staging.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

docker/php.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/wordpress_xdebug/Dockerfile-php73

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)