How to sync one site with other using WP-CLI and rsync

  1. Run wp db export filename.sql from site’s root directory
  2. Rsync -avzhp ./filename.sql  <destination/site/root/dir>
  3. From the new site’s root directory wp db import filename.sql