PHPackages                             n5s/wp-cli-move - 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. [Database &amp; ORM](/categories/database)
4. /
5. n5s/wp-cli-move

ActiveWp-cli-package[Database &amp; ORM](/categories/database)

n5s/wp-cli-move
===============

Sync your WordPress content (database and uploads) between stages using the power of WP-CLI aliases.

0.1.3(1mo ago)32459[1 issues](https://github.com/nlemoine/wp-cli-move/issues)[1 PRs](https://github.com/nlemoine/wp-cli-move/pulls)MITPHPPHP ^8.1CI passing

Since Jan 24Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/nlemoine/wp-cli-move)[ Packagist](https://packagist.org/packages/n5s/wp-cli-move)[ RSS](/packages/n5s-wp-cli-move/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (26)Versions (8)Used By (0)

wp-cli-move
===========

[](#wp-cli-move)

Sync your WordPress content (database and uploads) between stages using the power of WP-CLI aliases.

Install
-------

[](#install)

Using composer:

```
composer require n5s/wp-cli-move --dev
```

Using `wp package install`:

```
wp package install nlemoine/wp-cli-move:^0.1.0
```

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

[](#requirements)

The requirements must be met on both stages.

- SSH access
- WP-CLI
- mysql/mysqldump
- rsync
- gzip (optional, can be disabled with the `--disable-compress` flag)

Before running commands, make sure you have WP-CLI aliases set up. This can be done either with the [`wp cli alias`](https://developer.wordpress.org/cli/commands/cli/alias/) command or by editing your `wp-cli.yml` file.

Once you're done, quickly check that remote WP-CLI commands work as expected:

```
wp @your-alias option get home

# It should print your alias home URL
https://example.org
```

For more information about alias configuration, refer to the following WP-CLI documentation:

-
-

Usage
-----

[](#usage)

Depending on the sync direction, use either the `pull` or `push` commands.

```
wp move pull/push [] [--db] [--uploads] [--disable-compress] [--dry-run]
```

If you omit the `--db` or `--uploads` flags, both data types will be synced by default.

Note that the `` argument is optional. Configured aliases will be shown in a menu to choose from if left empty.

Caution

Just like any tool that manipulates your data, it's **always a good idea to make a backup before running commands**.

Especially when syncing uploads, which uses the `rsync` command with the `--delete` flag under the hood and can wipe all your media files if used incorrectly.

**Be sure to know what you're doing.**

### Options

[](#options)

Both `pull` and `push` commands use the same options.

- `[]`: The alias you want to sync with.
- `--db`: Sync only the database.
- `--uploads`: Sync only the uploads.
- `--disable-compress`: Disable database dump compression.
- `--dry-run`: Print the command sequence without making any changes.

Note

Each time you sync your database from one stage to another, `wp-cli-move` will locally backup the database of the synced stage (a local database dump when pulling, a remote database dump when pushing).

### Multisite

[](#multisite)

Multisite installations are supported. In addition to the home URL replacement, `wp-cli-move` will:

- bootstrap WordPress with the source URL (`--url=...`): right after an import, the database does not match the configured `DOMAIN_CURRENT_SITE` anymore, WordPress could not load otherwise
- scope replacements to all tables sharing the install prefix (`--all-tables-with-prefix`), so plugin tables that are not registered on `$wpdb` (e.g. Yoast indexables) are covered too
- on subdomain networks, run a dedicated replacement pair for each site (`https://en.example.org` → `https://en.example.test`)
- replace the bare domain (e.g. `example.org` → `example.test`) in the `wp_site` and `wp_blogs` tables **only**: email addresses or domain mentions in content are left untouched

Network types:

- **Subdirectory** networks are fully covered.
- **Subdomain** networks are covered as long as domains are renamed consistently between stages (`en.example.org` on production is expected to be `en.example.test` locally).
- **Domain mapped** sites are skipped with a warning: there is no way to guess their destination domain. Sites with custom mapped domains keep them after a sync.

### Examples

[](#examples)

### Pulling content

[](#pulling-content)

Pull your production content to your local environment:

```
wp move pull @production
```

Tip

Using `@` as declared in `wp-cli.yml` is optional. For example, `production` and `@production` will resolve the same alias.

### Pushing content

[](#pushing-content)

Push your local content to your staging environment:

```
wp move push staging
```

Credits
-------

[](#credits)

This WP-CLI package aims to replace the (still working but unmaintained) awesome [Wordmove](https://github.com/welaika/wordmove) Ruby gem 💎. It has been a time and life saver for many years. I'll be forever grateful to [@alessandro-fazzi](https://github.com/alessandro-fazzi) for creating it! 🙌

Although [Wordmove](https://github.com/welaika/wordmove) is a great and handy tool for your daily WordPress work, some reasons led me to come with a simpler, more WordPress flavoured alternative:

- It has become harder to easily install the gem over the years as the required Ruby version has been deprecated, especially for non-Ruby developers (at least for me).
- Most importantly, [an idea I submitted years ago](https://github.com/welaika/wordmove/issues/601#issue-612726521) has never been implemented. This feature would remove a lot of tedious configuration setup (database credentials, etc.).
- It's written in Ruby 😄

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance89

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~169 days

Total

4

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f16c9d375343e12eb02b2a3095dc9a02047287b5f12f75ef4c59929fcb2802?d=identicon)[n5s](/maintainers/n5s)

---

Top Contributors

[![nlemoine](https://avatars.githubusercontent.com/u/2526939?v=4)](https://github.com/nlemoine "nlemoine (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

clidatabasedeploymentmigrationphprsyncsyncwordpresswp-cliwp-cli-package

###  Code Quality

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/n5s-wp-cli-move/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.8k117.8M121](/packages/jdorn-sql-formatter)[backup-manager/backup-manager

A framework agnostic database backup manager with user-definable procedures and support for S3, Dropbox, FTP, SFTP, and more with drivers for popular frameworks.

1.7k1.6M11](/packages/backup-manager-backup-manager)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[insolita/yii2-migration-generator

Set of gii tools for generating files for migration by schema of table , phpdoc or table data

108508.0k5](/packages/insolita-yii2-migration-generator)[xpdo/xpdo

A PDO-based Object/Relational Bridge Library

7088.4k4](/packages/xpdo-xpdo)

PHPackages © 2026

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