Skip to content

Instantly share code, notes, and snippets.

@andreiglingeanu
Last active December 4, 2023 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreiglingeanu/8b6ca3f337a1e567039910c0e3c0434e to your computer and use it in GitHub Desktop.
Save andreiglingeanu/8b6ca3f337a1e567039910c0e3c0434e to your computer and use it in GitHub Desktop.
# WARNING: Run all the commands one by one and carefully examine the output of each command
# 1. First run the replace with dry run, to see which tables exactly will be affected and how many replacements will be there.
wp search-replace --dry-run "paletteColor" "theme-palette-color-"
wp search-replace --dry-run "buttonInitialColor" "theme-button-background-initial-color"
wp search-replace --dry-run "var(--fontFamily)" "var(--theme-font-family)"
wp search-replace --dry-run "var(--color)" "var(--theme-text-color)"
# 2. Actually perform the replacement
wp search-replace "paletteColor" "theme-palette-color-"
wp search-replace "buttonInitialColor" "theme-button-background-initial-color"
wp search-replace "var(--fontFamily)" "var(--theme-font-family)"
wp search-replace "var(--color)" "var(--theme-text-color)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment