Skip to content

Remove duplicate plugin mount from wp-env config#101

Merged
kraftbj merged 3 commits intotrunkfrom
fix-wpenv-double-mount
Mar 16, 2026
Merged

Remove duplicate plugin mount from wp-env config#101
kraftbj merged 3 commits intotrunkfrom
fix-wpenv-double-mount

Conversation

@kraftbj
Copy link
Collaborator

@kraftbj kraftbj commented Mar 16, 2026

Summary

  • Remove "." from the plugins array in .wp-env.json to eliminate a duplicate plugin mount
  • The mappings section already mounts the project as wp-content/plugins/press-this, so the plugins entry caused wp-env to mount it a second time under the workspace directory name (e.g. bamako)
  • With both mounts, wp plugin list showed two entries: the workspace-named one (active) and press-this (inactive) — meaning the plugin ran under the wrong directory name

Test plan

  • wp-env start succeeds
  • wp plugin list shows only press-this (no duplicate under workspace dir name)
  • All 24 e2e tests pass

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.
@kraftbj kraftbj added this to the 2.0.2 milestone Mar 16, 2026
@kraftbj kraftbj requested a review from Copilot March 16, 2026 23:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the implicit “mount current directory as a plugin” behavior from wp-env by clearing the plugins list, so the plugin is only mounted via the explicit mappings entry (wp-content/plugins/press-this).

Changes:

  • Removed "." from the plugins array to prevent a second plugin mount under the workspace directory name.
  • Leaves the plugin mounted solely through mappings to ensure WordPress sees only press-this.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kraftbj added 2 commits March 16, 2026 18:20
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.
@kraftbj kraftbj merged commit 1383e12 into trunk Mar 16, 2026
7 checks passed
@kraftbj kraftbj deleted the fix-wpenv-double-mount branch March 16, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants