Fix Studio Assistant download plugins wp-cli commands by mounting Studio mu-plugins - #2243
Conversation
📊 Performance Test ResultsComparing cf99292 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
ivan-ottinger
left a comment
There was a problem hiding this comment.
Works great! I can confirm the proposed changes fix the issue. WP CLI plugin installation runs as expected:
and there are no extra files added:
Site export works as well. 👍🏼
The changes themselves look good to me too. It may be worth having a second pair of eyes look at them since I haven't reviewed many Playground CLI related changes yet and could be missing something there.
|
@sejas, would you mind sharing more details on what caused the issue and why mounting mu-plugins resolved it? |
@wojtekn, the issue was that some WP-CLI commands didn't work, specifically those that had to download a file from wp.org, such as installing a plugin or theme. We have a mu-plugin, 0-allowed-redirect-hosts.php, that helps resolving those domains. When we switched from wp-now to playground-cli, we also changed how Studio mu-plugins are mounted, mounting them only when Studio starts and not when executing wp-cli commands. In this PR, I'm mounting the Studio mu-plugins for wp-cli executions as well. Now, wp-cli executions and Studio start sites will behave more similarly. |



Related issues
Proposed Changes
Testing Instructions
Confirm the issue is fixed
npm startsqlite-database-integration.Try other wp-cli commands like sqlite export
Pre-merge Checklist