wp-vagrant icon indicating copy to clipboard operation
wp-vagrant copied to clipboard

wp-pull-production-db fails for WP Network sites

Open Phoenix2k opened this issue 8 years ago • 3 comments

After running wp-pull-production-db all wp-cli commands stop working, because the database has now the production Network domain while the Vagrant config files refer to the local version.

The temporary workaround is to use DOMAIN_CURRENT_SITE='https://example.local' before running wp search-replace.

The second problem is that the search-replace does not change all occurences of the production domain. It should be run with the --network flag to also update all wp_blogs and wp_sites etc tables.

(Bug report written by Otto on customer's laptop)

Phoenix2k avatar May 23 '17 12:05 Phoenix2k

@l3ku Please implement or reassign this once the new Vagrant image with is out and in production, and it makes sense to improve the scripts inside it.

ottok avatar May 23 '18 08:05 ottok

The latest Vagrant box released on Monday has an improved wp-pull-production-db command that now handles the main site of a network. Subdomains in a subdomain network cannot yet be automated however. See https://seravo.com/docs/get-started/release-notes/ and https://seravo.com/docs/configuration/wordpress-network/#local-development-with-vagrant-and-wordpress-network

ottok avatar May 17 '19 09:05 ottok

Note related issues:

  • https://github.com/Seravo/wordpress/issues/74
  • https://github.com/Seravo/wordpress/issues/81

ottok avatar Jan 27 '21 13:01 ottok