From 2db77736b3b5dda581350ca25be96ee9735037db Mon Sep 17 00:00:00 2001 From: Brandon Kraft Date: Mon, 16 Mar 2026 17:58:06 -0500 Subject: [PATCH 1/2] Remove duplicate plugin mount from wp-env config The plugins array contained "." which caused wp-env to mount the workspace directory as a plugin, duplicating the explicit mapping in the mappings section. This could cause conflicts when the workspace directory differs from the project root. --- .wp-env.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.wp-env.json b/.wp-env.json index 5208abb..1500548 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -2,9 +2,7 @@ "$schema": "https://schemas.wp.org/trunk/wp-env.json", "core": null, "phpVersion": "8.2", - "plugins": [ - "." - ], + "plugins": [], "themes": [], "config": { "WP_DEBUG": true, From 514ee2c59435eee5789b600f574583f3257e5152 Mon Sep 17 00:00:00 2001 From: Brandon Kraft Date: Mon, 16 Mar 2026 18:20:57 -0500 Subject: [PATCH 2/2] Activate plugin via lifecycleScripts after wp-env start With the plugins array empty, the mapping alone places files but does not activate the plugin. Add an afterStart lifecycle script to activate press-this automatically on every wp-env start. --- .wp-env.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.wp-env.json b/.wp-env.json index 1500548..fdcb9ae 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -13,6 +13,9 @@ "wp-content/plugins/press-this": ".", "wp-content/mu-plugins": "./tests/mu-plugins" }, + "lifecycleScripts": { + "afterStart": "npx wp-env run cli wp plugin activate press-this" + }, "env": { "tests": { "phpVersion": "8.2",