Skip to content

Run search-replace without bootstrapping WordPress multisite entirely when --network is used #41

@danielbachhuber

Description

@danielbachhuber

One annoying, and even confusing, idiosyncrasy of wp search-replace on multisite:

wp search-replace old.com new.com --network --url=old.com

If you forget --url=old.com and DOMAIN_CURRENT_SITE=new.com, you'll get a confusing "Site not found" error because WordPress fails to look up the site before wp search-replace can execute.

If --network, --all-tables, --all-tables-with-prefix, or any tables are provided, it's not necessary to know the blog context for wp search-replace. In this case, we should be able to run wp search-replace without bootstrapping WordPress multisite entirely.

Related wp-cli/cache-command#17

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions