Problem

Offer users the ability to run WP-CLI commands in the browser, without necessarily granting SSH access.

Proposed Algorithm

To provide WP-CLI access to users in environments where SSH access isn’t readily available, it would be helpful to be able to use WP-CLI through a web browser.

On a high level, this might involve:

  • Creating a JavaScript-based UI to provide the WP-CLI "terminal".
  • Using WebSockets to connect to an application server that runs the WP-CLI commands as tasks.

Some considerations in the implementation include:

  • Determining which WordPress users should have the ability to run commands.
  • Providing a way to restrict the commands available, and log the commands used.

Related Spark: Using WP-CLI without SSH access to the server