PHPackages                             gwa/wpsh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gwa/wpsh

ActiveProject[Utility &amp; Helpers](/categories/utility)

gwa/wpsh
========

Wordpress sync commandline tool

v1.0.1(9y ago)323[3 issues](https://github.com/gwa/wpsh/issues)MITPHP

Since Dec 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gwa/wpsh)[ Packagist](https://packagist.org/packages/gwa/wpsh)[ RSS](/packages/gwa-wpsh/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

wpsh
====

[](#wpsh)

A command line tool for local WordPress development.

Introduction
------------

[](#introduction)

`wpsh` is a command line tool we use to sync the database and uploaded files from a remote (PRODUCTION) WordPress install to a local (DEVELOPMENT) install.

It was inspired by Drupal's `drush` tool.

Prerequisites
-------------

[](#prerequisites)

You will need:

- `composer` installed locally (for installation).
- `mysql` needs to be installed remotely.
- `mysql` and `rsync` need to be installed locally and in your path.
- SSH access to the remote server.

Installation
------------

[](#installation)

Install globally using [composer](https://getcomposer.org).

```
$ composer global require gwa/wpsh
```

Test that `wpsh` is installed:

```
$ wpsh
```

You should see some usage help output.

Setup
-----

[](#setup)

### Aliases

[](#aliases)

Site "aliases" contain the configuration for a site, either remote or local. `wpsh` looks for site aliases in `~/.wpsh`.

First create the directory in your HOME directory.

```
$ mkdir ~/.wpsh
```

Create a file called in `~/.wpsh` called `alias.[mysite].php`.

`mysite` can contain alphanumeric characters, hyphens and periods.

```
