Created
March 9, 2017 20:22
-
-
Save guillaumemolter/890c23272173469cf488a71b3ea46016 to your computer and use it in GitHub Desktop.
A list of usefull commands to maitain a WordPress multisite install using WP-CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Network wide search and replace | |
wp search-replace 'NEEDLE' 'HAYSTACK' --network --verbose | |
# Network wide search and replace for domain (ie: prod to dev DB migration) | |
wp search-replace 'old.domain.com' 'new.domain.com' --network --verbose --url=old.domain.com | |
# Network wide rewrite rules and permalinks flush | |
wp site list --field=url | xargs -n1 -I % wp rewrite flush --url=% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment