close
Skip to content

Expose pathAliases and rewriteRules from runCLI#3384

Closed
adamziel wants to merge 1 commit intotrunkfrom
adamziel/expose-cli-path-options
Closed

Expose pathAliases and rewriteRules from runCLI#3384
adamziel wants to merge 1 commit intotrunkfrom
adamziel/expose-cli-path-options

Conversation

@adamziel
Copy link
Collaborator

Summary

When importing a site into Studio via streaming-site-migration, the recreated remote host directory structure may not have a wp-admin directory directly in the document root. Custom rewrite rules let the caller remap URL paths to the actual filesystem layout so WordPress still boots correctly.

pathAliases was already threaded through RunCLIArgs but rewriteRules was hardcoded to the default WordPress set inside bootRequestHandler(). This change adds rewriteRules to RunCLIArgs and BootRequestHandlerOptions, and appends any caller-provided rules after the built-in WordPress rewrite rules.

Test plan

  • Confirm existing CLI tests pass
  • Call runCLI() programmatically with custom rewriteRules and verify they take effect

When importing a site into Studio via streaming-site-migration, the
recreated remote host directory structure may not have wp-admin directly
in the document root. Custom rewrite rules let the caller remap URL
paths to the actual filesystem layout so WordPress still boots correctly.

pathAliases was already plumbed through RunCLIArgs but rewriteRules was
hardcoded to the default WordPress set. This change adds rewriteRules
to RunCLIArgs and BootRequestHandlerOptions, and appends any caller-
provided rules after the built-in WordPress rewrite rules.
@adamziel
Copy link
Collaborator Author

ah, pathAliases is already exposed, we don't need this PR

@adamziel adamziel closed this Mar 12, 2026
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.

1 participant