Skip to content

SSH: Allow to specify path of remote wp-cli or full command #5245

Description

@coccoinomane

Describe your use case and the problem you are facing

The SSH feature is incredibly convenient as it allows my web agency to manage 40+ WordPress installation from a central point regardless of where they are hosted.

In particular, it is so useful being able to specify the path parameter for each site directly in the YAML config file.

However, our clients use different hosting providers; each remote machine has a different location for wp-cli, which is not always accessible through wp.
To make things worse, most of the times we do not even have sudo access.

I know there are ways to solve this problem, but AFAIK they require to alter something on the remote machine (docs) and they might not be that intuitive (see for example #5219).

Describe the solution you'd like

It would be so convenient to have a wp-cli-path option in config.yaml where the user can specify the location of the remote wp-cl installation:

@example:
    ssh: example.com
    path: /home/public_html/
    wp-cli-path: /home/bin/wp

An interesting extension would be to allow to specify a full command:

@example:
    ssh: example.com
    path: /home/public_html/
    wp-cli: php /home/wp-cli.phar

The main advantage of this approach is that the only action required on the remote machine would be to do the curl command to get wp-cli.phar.
In particular, there would be no need to mess with the $PATH or other environment variables, or with PHP files.

Would this feature be feasible?

Thank you,
Guido

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions