Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (15 loc) · 750 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 750 Bytes

WPDB Sync

Install

Clone to bin, alias it, whatever you want. Doesn't need to be in your site dir.

Give permission to run as an executable: chmod u+x on the wpdb-sync file in the project root.

Signature and Usage

First, add a site to the wpdb-sync config (~/.config/wpdb-sync) using wpdb-sync new. You can add as many sites as you like by running wpdb-sync new multiple times.

wpdb-sync new {host} {site_root} {development} {staging} {production}

Now, you can push and pull the database between environments:

wpdb-sync {host} {origin} {destination}

Assumptions

  • You already have wp-cli aliases set up and you use the following naming convention: @development, @staging, @production.