PHPackages                             timneutkens/wp-cli-dbsync - 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. timneutkens/wp-cli-dbsync

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

timneutkens/wp-cli-dbsync
=========================

Import database from remote host

1.1.2(8y ago)71051MITPHPPHP &gt;=5.4

Since Apr 30Pushed 8y agoCompare

[ Source](https://github.com/timneutkens/wp-cli-dbsync)[ Packagist](https://packagist.org/packages/timneutkens/wp-cli-dbsync)[ RSS](/packages/timneutkens-wp-cli-dbsync/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

WP-CLI DB Sync
==============

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

*Remote to local database import tool for wp-cli*

This is a wp-cli command version of [this gist](https://gist.github.com/timneutkens/32c9bcd7d8576e663958ed4b1389c1dc)

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

[](#installation)

`composer require timneutkens/wp-cli-dbsync:^1.0.0`

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

[](#configuration)

This command uses [wp-cli-ssh](https://github.com/xwp/wp-cli-ssh).

To get started use their instructions to setup a remote host:

Add an `ssh` section to your `wp-cli.yml`/`wp-cli.local.yml`, as seen in the [sample config](wp-cli.sample.yml). You indicate the `ssh` command templates for each host you want to connect to. The template variable `%cmd%` is replaced with the full command to run on the server; the `%pseudotty%` template variable is replaced with `-t`/`-T` depending on whether you're on a TTY or piping the command output.

For a step-by-step guide, please refer to the [wiki](https://github.com/x-team/wp-cli-ssh/wiki/Configuring-the-plugin).

Now you can run the following command:

`wp dbsync `

The command will import the database. After that it will search replace the old home url to the new home url using `wp search-replace`. The new home url will be guessed using `wp option get home`. Beware that if you define `WP_HOME` this command will return that url instead of the url set in the `wp_options` table. Optionally you can provide `--new-base-url=http://example.com` to override this behaviour.

Replace `` with the host you just setup in your `wp-cli.yml`/`wp-cli.local.yml`.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

2930d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bc55310e500d0aa2131aa1c80a51f50d8507cbcdf835c2592fea497fe18de87?d=identicon)[timneutkens](/maintainers/timneutkens)

---

Top Contributors

[![timweprovide](https://avatars.githubusercontent.com/u/67999201?v=4)](https://github.com/timweprovide "timweprovide (5 commits)")[![timneutkens](https://avatars.githubusercontent.com/u/6324199?v=4)](https://github.com/timneutkens "timneutkens (1 commits)")

---

Tags

databasewp-cli

### Embed Badge

![Health badge](/badges/timneutkens-wp-cli-dbsync/health.svg)

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k595.8M6.5k](/packages/doctrine-dbal)[doctrine/orm

Object-Relational-Mapper for PHP

10.2k295.3M7.2k](/packages/doctrine-orm)[doctrine/doctrine-bundle

Symfony DoctrineBundle

4.8k249.9M3.9k](/packages/doctrine-doctrine-bundle)[doctrine/migrations

PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.

4.8k212.9M509](/packages/doctrine-migrations)[doctrine/data-fixtures

Data Fixtures for all Doctrine Object Managers

2.9k141.0M566](/packages/doctrine-data-fixtures)[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.6k48.7M443](/packages/robmorgan-phinx)

PHPackages © 2026

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