2017 © Pedro Peláez
 

library wp-cli-dbsync

Import database from remote host

image

timneutkens/wp-cli-dbsync

Import database from remote host

  • Friday, June 22, 2018
  • by timneutkens
  • Repository
  • 1 Watchers
  • 4 Stars
  • 80 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

WP-CLI DB Sync

Remote to local database import tool for wp-cli, (*1)

This is a wp-cli command version of this gist, (*2)

Installation

composer require timneutkens/wp-cli-dbsync:^1.0.0, (*3)

Configuration

This command uses wp-cli-ssh., (*4)

To get started use their instructions to setup a remote host:, (*5)

Add an ssh section to your wp-cli.yml/wp-cli.local.yml, as seen in the sample config. 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., (*6)

For a step-by-step guide, please refer to the wiki., (*7)

Now you can run the following command:, (*8)

wp dbsync <host here>, (*9)

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., (*10)

Replace <host here> with the host you just setup in your wp-cli.yml/wp-cli.local.yml., (*11)

The Versions

22/06 2018

dev-master

9999999-dev

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli

22/06 2018

1.1.2

1.1.2.0

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli

01/05 2016

1.1.1

1.1.1.0

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli

01/05 2016

1.1.0

1.1.0.0

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli

30/04 2016

1.0.1

1.0.1.0

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli

30/04 2016

1.0.0

1.0.0.0

Import database from remote host

  Sources   Download

MIT

The Requires

 

by Tim Neutkens

database wp-cli