PHPackages                             stafflink-pty-ltd/wp-cli-sync - 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. [CLI &amp; Console](/categories/cli)
4. /
5. stafflink-pty-ltd/wp-cli-sync

ActiveWordpress-muplugin[CLI &amp; Console](/categories/cli)

stafflink-pty-ltd/wp-cli-sync
=============================

A WP-CLI command for syncing a live site to a development environment. Based on the original package by Jon Beaumont-Pike.

1.3.2(3y ago)032MITPHP

Since May 9Pushed 3y agoCompare

[ Source](https://github.com/mattneal-stafflink/wp-cli-sync)[ Packagist](https://packagist.org/packages/stafflink-pty-ltd/wp-cli-sync)[ Docs](https://github.com/mattneal-stafflink/wp-cli-sync)[ RSS](/packages/stafflink-pty-ltd-wp-cli-sync/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (11)Used By (0)

 [![WP-CLI Sync](https://camo.githubusercontent.com/5651f554243986daebde8abcf06b4d612cb72c240544d13219225f2dfcadb220/68747470733a2f2f6a6f6e62702e6769746875622e696f2f70726f6a6563742d69636f6e732f77702d636c692d73796e632e737667)](https://github.com/jonbp/wp-cli-sync)
WP-CLI Sync
====================================================================================================================================================================================================================================================================================

[](#--wp-cli-sync)

 [ ![Packagist Latest Version](https://camo.githubusercontent.com/042090a97c4a48744649cdbfa9296a4483b9be88810668239ffc11a84bb7d8a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6e62702f77702d636c692d73796e63) ](https://packagist.org/packages/jonbp/wp-cli-sync) [ ![Packagist Downloads](https://camo.githubusercontent.com/9dd442b83795fe010135a52d70b6dfce5b5d20cd91a59713af6aa97dd3832427/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a6f6e62702f77702d636c692d73796e63) ](https://packagist.org/packages/jonbp/wp-cli-sync) [ ![GitHub Open Issues](https://camo.githubusercontent.com/69df595a3d4d3003764dfead66ea081ef92d2986cf982aee7bd0415152bfe469/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7261772f6a6f6e62702f77702d636c692d73796e63) ](https://github.com/jonbp/wp-cli-sync/issues) [ ![GitHub Open Pull Requests](https://camo.githubusercontent.com/240870531d83ee20b36a469607e91a7ed1d166c42eac39aa2aab1beddd384576/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722d7261772f6a6f6e62702f77702d636c692d73796e63) ](https://github.com/jonbp/wp-cli-sync/pulls)

A WP-CLI command for syncing a live site to a development environment

 [![](https://camo.githubusercontent.com/012bac6da7cbad573a08c563771d1808a3303dc257c7437bf494056d20cbfab4/68747470733a2f2f692e696d6775722e636f6d2f756755686375512e676966)](https://camo.githubusercontent.com/012bac6da7cbad573a08c563771d1808a3303dc257c7437bf494056d20cbfab4/68747470733a2f2f692e696d6775722e636f6d2f756755686375512e676966)

Requirements
------------

[](#requirements)

- A [bedrock](https://github.com/roots/bedrock) based WordPress project
- SSH connection to live server
- [WP-CLI](https://github.com/wp-cli/wp-cli)
- [rsync](https://rsync.samba.org)

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

[](#installation)

1. Require the plugin by running:

```
composer require jonbp/wp-cli-sync
```

2. Add the following to your `.env` file (don't forget `.env.example` for reference 😉):

```
# WP-CLI Sync Settings [wp sync]
LIVE_SSH_USERNAME=""
LIVE_SSH_HOSTNAME=""
REMOTE_PROJECT_LOCATION="~/gitrepo"

# Plugins should be formatted in a comma seperated format
# For example: "plugin1,plugin2,plugin3"

# Plugins activated on sync
DEV_ACTIVATED_PLUGINS=""

# Plugins deactivated on sync
DEV_DEACTIVATED_PLUGINS=""

# Dirs to exclude from sync
# Multiple dirs can be provided by separating with a comma
# Use dir names or paths relative to uploads dir
DEV_SYNC_DIR_EXCLUDES=""

# DB Queries to run after sync
DEV_POST_SYNC_QUERIES=""
```

3. Run `wp sync` from the project root.

First Sync
----------

[](#first-sync)

You may find yourself working on a bedrock project that already exists on a production server and you don't have the database setup locally yet. Running `wp sync` in the project will fail in this case as it requires an active WordPress installation to run.

To remedy this, you can run the following commands to create a database (if necessary) and create a basic installation inside that database in order to run the plugin and its first sync.

```
wp db create
wp core install --url=abc.xyz --title=abc --admin_user=abc --admin_password=abc --admin_email=abc@abc.xyz --skip-email

```

It’s not necessary to edit the variables on the second line as the database is overwritten by the plugin during sync. The code is simply to give the plugin the requirements it needs to run without the real database installed.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 74.5% of commits — single point of failure

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 ~154 days

Recently: every ~283 days

Total

10

Last Release

1221d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/174957976?v=4)[realcoder](/maintainers/realcoder)[@RealCoder](https://github.com/RealCoder)

---

Top Contributors

[![jonbp](https://avatars.githubusercontent.com/u/3267483?v=4)](https://github.com/jonbp "jonbp (38 commits)")[![Muffinman](https://avatars.githubusercontent.com/u/1319568?v=4)](https://github.com/Muffinman "Muffinman (6 commits)")[![gmutschler](https://avatars.githubusercontent.com/u/1391421?v=4)](https://github.com/gmutschler "gmutschler (3 commits)")[![mattneal-stafflink](https://avatars.githubusercontent.com/u/68095856?v=4)](https://github.com/mattneal-stafflink "mattneal-stafflink (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![jon-love](https://avatars.githubusercontent.com/u/7539910?v=4)](https://github.com/jon-love "jon-love (1 commits)")

### Embed Badge

![Health badge](/badges/stafflink-pty-ltd-wp-cli-sync/health.svg)

```
[![Health](https://phpackages.com/badges/stafflink-pty-ltd-wp-cli-sync/health.svg)](https://phpackages.com/packages/stafflink-pty-ltd-wp-cli-sync)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)

PHPackages © 2026

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