1

Using WP-CLI I am wanting to search and replace posts content but only for certain URLs.

This is what I have so far:

$ wp search-replace 'Contact us today' 'Contact us today by filling in the form below' wp_posts --include-columns=post_content --dry-run

How can I adapt this command so that it only does the search replace on URLs within the products directory?

For example:

  • How are you setting up the "products directory" -- is it an actual directory? a parent page? a custom post type? – Pat J Aug 28 '19 at 15:14
  • @PatJ products directory is a parent page. – ianhman Aug 28 '19 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.