Roots Discourse

Unable to sync database on multisite with sync.sh

Hello,

Multisite setup working on both vagrant and remote.

I have setup the sync.sh in my sites folder and followed the READ.me to set correct paths and updated wp-cli.yml etc. I have tested the wp aliases and all works fine.

When I run the ./sync.sh development staging , the script is able to connect and uploads the upload directory and images etc in different sites folder. However, the database sync returns an error.

Error: Site 'staging.domain.com/' not found. Verify DOMAIN_CURRENT_SITE matches an existing site or use –url= to override.

Here is the screenshot of the run:

Any help / guide will be much appreciated. Thank you.

I guess the script has its own config, separate from the WP CLI config. So the script config must match the WP CLI config.

I wasn’t aware that this script was designed to work with multisite. If it is, I’d love to know how to configure it to do so!

Yes, there is sync.sh file which goes in site folder. I already configured it and it works to sync the uploads folder. However, the wp-cli is to sync database, which is cofigured as shows in the README file.

The issue is, this script moves database for a single site to staging server, but fails to recognize staging URL.

I am now wondering weather this is because this sync script is not compatible with multisite.

I guess you are right and most likely the script isn’t compatible with multisite. I used rsync and wp db export and that worked perfectly.

This topic was automatically closed after 42 days. New replies are no longer allowed.