• I work with alot of multsites. Is there a specific way a search and replace is suppose to be ran for subsites? So far in specific testing, we’ve found that the ideal is way:

    1. Update in Network Admin -> Sites
    2. Use Better Search and Replace.

    When using the CLI command wp search-replace ‘https://www.domain.com’ ‘https://domain.com’ –precise –all-tables –skip-plugins –skip-themes –skip-columns=user_email –report-changed-only it does not appear to be targeting all the urls and when you add –url=yoursubsiteurlhere.com it does not target all the database tables.

    (correct me if I am wrong)

    Is there a better wp-cli command? Do we need to add –network — keep in mind this specifically for only changing a subsite url and not the primary.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I don’t think there’s a specific “best” practice per se. Anything that gets the job done that you’re most comfortable with is what I would say is best. Personally, I have trouble remembering command line options and prefer a more interactive interface such as Better Search and Replace. Actually, I normally use the inter.connect search and replace tool, which is the engine that the Better Search and Replace plugin is based upon.

    The inter.connect tool does let you use regex search. You’d need the Pro version of Better Search and Replace in order to use regex search.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.