PHPackages                             jonbp/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. jonbp/wp-cli-sync

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

jonbp/wp-cli-sync
=================

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

1.3.2(2y ago)322.3k8MITPHPCI passing

Since May 9Pushed 2y ago3 watchersCompare

[ Source](https://github.com/jonbp/wp-cli-sync)[ Packagist](https://packagist.org/packages/jonbp/wp-cli-sync)[ Docs](https://github.com/jonbp/wp-cli-sync)[ RSS](/packages/jonbp-wp-cli-sync/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (11)Used By (0)

WP-CLI Sync[![WP-CLI Sync](https://camo.githubusercontent.com/5651f554243986daebde8abcf06b4d612cb72c240544d13219225f2dfcadb220/68747470733a2f2f6a6f6e62702e6769746875622e696f2f70726f6a6563742d69636f6e732f77702d636c692d73796e632e737667)](https://github.com/jonbp/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)

About
-----

[](#about)

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

This plugin is designed to be used with a [Roots Bedrock](https://github.com/roots/bedrock) based WordPress project.

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

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

[](#requirements)

You will need the following to use this plugin:

- 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)

To install this plugin, follow these steps:

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=""
```

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.

Extra Environment Variables
---------------------------

[](#extra-environment-variables)

Below is a list of extra environment variables that can be added to your `.env` file to customise the sync process.

VariableDescription`DEV_POST_SYNC_QUERIES`A comma seperated list of SQL queries to run after the sync has completed.`DEV_SYNC_DIR_EXCLUDES`A comma seperated list of directories within the uploads folder to exclude from the sync.`DEV_TASK_DEBUG`Set to `true` to show debug information about the commands being run. Useful for debugging if something isn't working as expected.`UPLOAD_DIR`The name of the uploads directory. Defaults to `app/uploads` where the uploads folder is located on a bedrock project.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 78% 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 ~180 days

Recently: every ~342 days

Total

10

Last Release

978d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/146dbf848e579122c28658ee0acd70568106a55fa43350434317c9d291499121?d=identicon)[jonbp](/maintainers/jonbp)

---

Top Contributors

[![jonbp](https://avatars.githubusercontent.com/u/3267483?v=4)](https://github.com/jonbp "jonbp (46 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)")[![paintface](https://avatars.githubusercontent.com/u/24572893?v=4)](https://github.com/paintface "paintface (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)")

---

Tags

bedrockbedrock-wordpress-installationphpwordpresswp-cli

### Embed Badge

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

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

###  Alternatives

[wp-cli/doctor-command

Diagnose problems within WordPress by running a series of checks for symptoms.

167266.4k2](/packages/wp-cli-doctor-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1728.2M20](/packages/wp-cli-scaffold-command)[wp-cli/core-command

Downloads, installs, updates, and manages a WordPress installation.

5210.9M26](/packages/wp-cli-core-command)[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1059.5M77](/packages/wp-cli-entity-command)[wp-cli/wp-cli-bundle

WP-CLI bundle package with default commands.

896.7M152](/packages/wp-cli-wp-cli-bundle)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11711.2M61](/packages/wp-cli-i18n-command)

PHPackages © 2026

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