I have a multidev setup for a WP multisite.
Every time I create a new multidev environment I get a database connection error in that new environment because the URLs do not get updated from the cloned Dev environment to the new multidev environment.
I have created a custom workflow script (hooked into clone_database) to run passthru(‘wp search-replace…’) for each of the environments URLs. Every time I create a new multidev environment I must update this script with the new environment name and url, commit & merge that to Dev, then do another clone from the Dev environment to the new multidev environment which runs the custom workflow and updates the URLs in the database.
Please tell me I have been doing this inefficiently and there is an easier option.