Skip to content

Comments

Add plugin and theme installation via query parameters#23

Merged
srtfisher merged 10 commits intomainfrom
copilot/support-plugin-installation
Feb 11, 2026
Merged

Add plugin and theme installation via query parameters#23
srtfisher merged 10 commits intomainfrom
copilot/support-plugin-installation

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

  • Understand WordPress Playground query API for plugin installation
  • Add plugin/theme query parameter handling in frontend
    • Parse URL query parameters for plugin slugs
    • Add plugins and themes state to PlaygroundContext
    • Update reducer to handle plugin state
  • Update playground initialization to install plugins and themes
    • Add plugins property to blueprint configuration
    • Add theme installation via steps
    • Fix login issue by using steps for all installations
  • Add plugin/theme support to Share model and controller
    • Add plugins and themes columns to shares table
    • Update validation and store logic
    • Update share display to include plugins and themes
  • Update frontend to include plugins and themes in share creation
  • Add tests for plugin and theme installation
    • E2E test for URL with plugin parameter
    • E2E test for URL with theme parameter
    • Backend test for storing/retrieving shares with plugins
    • Backend test for storing/retrieving shares with themes
  • Update documentation with usage examples
  • Address code review feedback
  • Fix login issue when plugins are specified
Original prompt

This section details on the original issue you should resolve

<issue_title>Support for plugin installation</issue_title>
<issue_description>### Description

I would like plugins to be able to be installed easily (similar to how Playground does it) via the query API: https://wordpress.github.io/wordpress-playground/developers/apis/query-api/

Use Case

as titled.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 11, 2026 20:52
Co-authored-by: srtfisher <346399+srtfisher@users.noreply.github.com>
Co-authored-by: srtfisher <346399+srtfisher@users.noreply.github.com>
Co-authored-by: srtfisher <346399+srtfisher@users.noreply.github.com>
Co-authored-by: srtfisher <346399+srtfisher@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for easy plugin installation via query API Add plugin and theme installation via query parameters Feb 11, 2026
Copilot AI requested a review from srtfisher February 11, 2026 20:59
@srtfisher srtfisher marked this pull request as ready for review February 11, 2026 21:28
@srtfisher
Copy link
Member

@copilot when i add ?plugin= to the request I am not logged into wordpress anymore when the page loads

Change from using top-level 'login' and 'plugins' properties to using steps exclusively. This ensures login happens before plugin/theme installation, preventing the issue where users are not logged in when plugins are specified.

All plugin/theme installations now use explicit steps with proper ordering:
1. Login step (first)
2. Enable multisite (if needed)
3. Install plugins (with activate: true)
4. Install themes

Co-authored-by: srtfisher <346399+srtfisher@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot when i add ?plugin= to the request I am not logged into wordpress anymore when the page loads

Fixed in commit 17d3351. The issue was caused by using the top-level plugins property in the Blueprint configuration alongside the login object, which created a timing conflict.

The solution was to use steps exclusively for all installations, ensuring login happens first:

  1. Login step executes first to authenticate
  2. Then plugin installation steps (with activate: true)
  3. Then theme installation steps

This ensures you remain logged in when plugins are specified via query parameters like ?plugin=hello-dolly.

@srtfisher srtfisher merged commit 997077f into main Feb 11, 2026
3 checks passed
@srtfisher srtfisher deleted the copilot/support-plugin-installation branch February 11, 2026 21:45
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.

Support for plugin installation

2 participants