{"id":20406658,"url":"https://github.com/xwp/wp-cli-ssh","last_synced_at":"2025-04-12T15:08:17.453Z","repository":{"id":11965717,"uuid":"14538062","full_name":"xwp/wp-cli-ssh","owner":"xwp","description":"[OBSOLETE] Seamlessly run WP-CLI commands on a remote server via SSH","archived":false,"fork":false,"pushed_at":"2016-07-28T02:07:48.000Z","size":130,"stargazers_count":157,"open_issues_count":8,"forks_count":14,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-12T15:08:12.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T21:10:09.000Z","updated_at":"2024-08-28T17:53:53.000Z","dependencies_parsed_at":"2022-08-25T04:51:14.749Z","dependency_job_id":null,"html_url":"https://github.com/xwp/wp-cli-ssh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-cli-ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-cli-ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-cli-ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-cli-ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwp","download_url":"https://codeload.github.com/xwp/wp-cli-ssh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586234,"owners_count":21128997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T05:18:39.358Z","updated_at":"2025-04-12T15:08:17.423Z","avatar_url":"https://github.com/xwp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"*DEPRECATED*: This feature is now part of WP-CLI itself as of [v0.24.0](http://wp-cli.org/blog/version-0.24.0.html). See [wp-cli#2754](https://github.com/wp-cli/wp-cli/issues/2754).\n\n# WP-CLI SSH\n*Seamlessly run WP-CLI commands on a remote server via SSH*\n\n![Running wp plugin status on production](screenshot1.png)\n\nWP-CLI is an extremely useful tool for managing WordPress installs, but it requires \nyou to invoke it on the same server where WordPress is installed. This means you have\nto SSH into the server, navigate to the install, and then run the command. It would\nbe much more convenient if you could remain on your local shell and invoke WP-CLI \nremotely; this is especially the case when using Vagrant. \n\nThe WP-CLI SSH script is also TTY-aware, so if you try piping the results of a WP-CLI SSH \ncommand to another program, it will return the machine-formatted output (e.g. no colors or table cells).\n\n## Configuration\n\nAssuming you have a clone of your WordPress install on your machine, add an `ssh` section\nto your `wp-cli.yml` config file. In this section you define the remote servers which \nhost the other environments for your site, e.g. `vagrant`, `staging`, and `production`. \nThen you just invoke WP-CLI normally, but supply an additional `--host` argument with\nhost you want to connect to:\n\n```bash\nwp ssh plugin status --host=production\n```\n\nYou can also provide Bash aliases to supply this argument by default:\n\n```bash\nalias wp=\"wp ssh --host=vagrant\"\nalias wpprod=\"wp ssh --host=production\"\n```\n\nAdd an `ssh` section to your `wp-cli.yml`/`wp-cli.local.yml`, as seen in the [sample config](wp-cli.sample.yml).\nYou indicate the `ssh` command templates for each host you want to connect to. The template variable `%cmd%` is \nreplaced with the full command to run on the server; the `%pseudotty%` template variable is replaced \nwith `-t`/`-T` depending on whether you're on a TTY or piping the command output.\n\nFor a step-by-step guide, please refer to the [wiki](https://github.com/x-team/wp-cli-ssh/wiki/Configuring-the-plugin).\n\n## Installation\n\nNote that you do not necessarily need WP-CLI installed on your server to use this. If the `wp` command is not\nrecognized on the server, the script will download the `wp-cli.phar` file and use that at runtime.\n\nInstalling WP-CLI-SSH on your machine can be done either by installation as a Composer package,\nor by adding a `require` config to a `wp-cli.local.yml`.\n\nFor global composer installation:\n```bash\ncomposer global require x-team/wp-cli-ssh dev-master\n```\n\n## Alternatives\n\n * [vassh](https://github.com/x-team/vassh)\n * [`wp` Bash function](https://github.com/humanmade/Salty-WordPress/issues/16)\n * [WP Remote CLI](https://github.com/humanmade/wp-remote-cli/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-cli-ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwp%2Fwp-cli-ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-cli-ssh/lists"}