PHPackages                             cullylarson/wp-deploy - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. cullylarson/wp-deploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

cullylarson/wp-deploy
=====================

A set of command-line tools for simple deployment of Wordpress installs. Can be used for automated deployment.

v0.1.1(10y ago)017[1 issues](https://github.com/cullylarson/wp-deploy/issues)MITPHPPHP &gt;=5.4.0

Since Nov 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/cullylarson/wp-deploy)[ Packagist](https://packagist.org/packages/cullylarson/wp-deploy)[ Docs](https://github.com/cullylarson/wp-deploy)[ RSS](/packages/cullylarson-wp-deploy/feed)WikiDiscussions master Synced 4w ago

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

wp-deploy
=========

[](#wp-deploy)

> A set of command-line tools for simple deployment of Wordpress installs. Can be used for automated deployment.

At this point, this is just a personal deploy script. I might make it into something more generic in the future.

All it does is sync the upload folder, and the database (including search/replace of things like URLs).

Install
-------

[](#install)

```
curl -s http://getcomposer.org/installer | php
php composer.phar require cullylarson/wp-deploy

```

Usage
-----

[](#usage)

To use, create a .env file (see `samples/sample.env`), and then run the `wp-push` or `wp-pull` commands.

Configuration
-------------

[](#configuration)

Configuration is done using environment variables. This turned out to be not the best solution, so it will probably change in the future. You can set the environment variables yourself (e.g put them in a shell script and run the script before using wp-push or wp-pull), or put them in a .env file in the current directory (which will be loaded automatically).

The following environment variables are used:

- **SOURCE\_WP\_UPLOADS** Path to the uploads folder on the source machine. Must end in a backslash.
- **SOURCE\_TMP** A folder to store temporary files on the source machine.
- **SOURCE\_MYSQL\_HOST** The mysql host name on the source machine.
- **SOURCE\_MYSQL\_USERNAME**
- **SOURCE\_MYSQL\_PASSWORD**
- **SOURCE\_MYSQL\_NAME**
- **SOURCE\_MYSQL\_PORT**
- **SOURCE\_SSH\_HOST** If the source machine is not local (see **SOURCE\_IS\_LOCAL**), this is the SSH hostname of the source machine. This script uses SSH-RSA trusted keys to authenticate the SSH connection. So, you can't use this script with a password.
- **SOURCE\_SSH\_USERNAME** SSH username on source machine.
- **SOURCE\_SRDB** If you're doing search/replace on the source machine (i.e. when using `wp-pull`), then this is the path to srdb.cli.php (part of (interconnectit/Search-Replace-DB)\[\]). This command is used to the search/replace in the database.
- **SOURCE\_IS\_LOCAL** Set to 1 or 0. Indicates whether the source machine is the local machine.
- **SOURCE\_WP\_SEARCH1** If doing a search/replace in the database on wp-pull, this is the first search term (e.g. "[www.somesourcedomain.com](http://www.somesourcedomain.com)"). It will replaced with the value of **SOURCE\_WP\_REPLACE1**. You can provide as many of these as you want (e.g. SOURCE\_WP\_SEARCH2, SOURCE\_WP\_SEARCH3). They just always need a corresponding REPLACE.
- **SOURCE\_WP\_REPLACE1** If doing a search/replace in the database on wp-pull, this is the first replace term (e.g. "[www.thenewdomain.com](http://www.thenewdomain.com)"). It will replace the value of **SOURCE\_WP\_SEARCH1**. You can provide as many of these as you want (e.g. SOURCE\_WP\_REPLACE2, SOURCE\_WP\_REPLACE3). They just always need a corresponding SEARCH.
- **DEST\_WP\_UPLOADS** Path to the uploads folder on the destination machine. Must end in a backslash.
- **DEST\_TMP** A folder to store temporary files on the destination machine.
- **DEST\_MYSQL\_HOST** The mysql host name on the destination machine.
- **DEST\_MYSQL\_USERNAME**
- **DEST\_MYSQL\_PASSWORD**
- **DEST\_MYSQL\_NAME**
- **DEST\_MYSQL\_PORT**
- **DEST\_SSH\_HOST** If the destination machine is not local (see **DEST\_IS\_LOCAL**), this is the SSH hostname of the destination machine. This script uses SSH-RSA trusted keys to authenticate the SSH connection. So, you can't use this script with a password.
- **DEST\_SSH\_USERNAME** SSH username on destination machine.
- **DEST\_SRDB** If you're doing search/replace on the destination machine (i.e. when using `wp-push`), then this is the path to srdb.cli.php (part of (interconnectit/Search-Replace-DB)\[\]). This command is used to the search/replace in the database.
- **DEST\_IS\_LOCAL** Set to 1 or 0. Indicates whether the destination machine is the local machine.
- **DEST\_WP\_SEARCH1** If doing a search/replace in the database on wp-push, this is the first search term (e.g. "[www.somesourcedomain.com](http://www.somesourcedomain.com)"). It will replaced with the value of **DEST\_WP\_REPLACE1**. You can provide as many of these as you want (e.g. DEST\_WP\_SEARCH2, DEST\_WP\_SEARCH3). They just always need a corresponding REPLACE.
- **DEST\_WP\_REPLACE1** If doing a search/replace in the database on wp-push, this is the first replace term (e.g. "[www.thenewdomain.com](http://www.thenewdomain.com)"). It will replace the value of **DEST\_WP\_SEARCH1**. You can provide as many of these as you want (e.g. DEST\_WP\_REPLACE2, DEST\_WP\_REPLACE3). They just always need a corresponding SEARCH.
- **LOCAL\_TMP** If doing a remote-to-remote sync (e.g. between two remote machines), this this is the path to a local folder to store temporary files. This is required because files from the remote source will be transferred locally before moving them to the remote destination.

wp-push
-------

[](#wp-push)

This command is used to push changes from the source to the destination.

```
% php vendor/bin/wp-push

```

wp-pull
-------

[](#wp-pull)

This command is used to pull changes from the destination to the source.

```
% php vendor/bin/wp-pull

```

SSH Authentication
------------------

[](#ssh-authentication)

The script using ssh-rsa trusted key authentication. So, your local machine's key needs to be in the `authorized_keys` file on the source and destination, if they aren't local. The script won't authenticate using passwords.

If you're getting and authentication error, try running this:

```
% eval `ssh-agent -s` && ssh-add

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3884d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8fd49dca98aa1426620976e8f93be38d75f4abf1531dc9b782294a59ebc2bd0?d=identicon)[cullylarson](/maintainers/cullylarson)

---

Tags

wordpresscommanddeploysyncdeployment

### Embed Badge

![Health badge](/badges/cullylarson-wp-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/cullylarson-wp-deploy/health.svg)](https://phpackages.com/packages/cullylarson-wp-deploy)
```

###  Alternatives

[easycorp/easy-deploy-bundle

The easiest way to deploy Symfony applications

467312.2k](/packages/easycorp-easy-deploy-bundle)[jalogut/magento2-deployer-plus

Magento 2 deployment tool based on deployer.org

201439.0k](/packages/jalogut-magento2-deployer-plus)[hpatoio/deploy-bundle

Easy deploy via rsync. Porting of Symfony 1 project:deploy command.

3397.2k1](/packages/hpatoio-deploy-bundle)[rafaelstz/deployer-magento2

Magento 2 deployment tool based on deployer.org

5223.8k](/packages/rafaelstz-deployer-magento2)[ngmy/webloyer

Webloyer is a Web UI for managing Deployer deployments

2191.1k](/packages/ngmy-webloyer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
