DB Search & Replace on Docker WP with WP-CLI

If you use WP-CLI as a separate container as usual, use this command to do a search replace without going into the container:

docker-compose run --no-deps --rm wpcli --allow-root search-replace "www.bilaltas.net" "dev.bilaltas.net" --recurse-objects --report-changed-onlyCode language: Bash (bash)

With less options:

docker-compose run --rm wpcli search-replace "www.bilaltas.net" "dev.bilaltas.net"Code language: Bash (bash)

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.