seravo-plugin icon indicating copy to clipboard operation
seravo-plugin copied to clipboard

Add search-replace extension for multisites

Open JoosuaKoskinen opened this issue 3 years ago • 0 comments

What are the main changes in this PR?

Extends wp-cli wp search-replace to replace DOMAIN_CURRENT_SITE on multisites when needed.

Prevents multisites from breaking on automatic domain changes or manual search-replace.

$ wp option get home
https://joosua.fi
$ grep -F htdocs/wp-config.php -e DOMAIN_CURRENT_SITE 
define( 'DOMAIN_CURRENT_SITE', 'joosua.fi' );

$ wp search-replace 'joosua.fi' 'wordpress.joosua.me' --quiet
$ wp cache flush
Success: The cache was flushed.

$ wp option get home
https://wordpress.joosua.me
$ grep -F htdocs/wp-config.php -e DOMAIN_CURRENT_SITE 
define( 'DOMAIN_CURRENT_SITE', 'wordpress.joosua.me' );

JoosuaKoskinen avatar Apr 20 '21 09:04 JoosuaKoskinen