Skip to content

Instantly share code, notes, and snippets.

@taija
Last active June 28, 2022 21:19
Show Gist options
  • Save taija/acf2ee09875b8550b89866bdae2897c1 to your computer and use it in GitHub Desktop.
Save taija/acf2ee09875b8550b89866bdae2897c1 to your computer and use it in GitHub Desktop.
Helpful WP CLI Commands
# Update Timezone for all sites in Multitise:
wp site list --field=url | xargs -n1 -I % wp --url=% option update timezone_string "America/Los_Angeles"
# Regenerate All Thumbnails everywhere!
wp site list --field=url | xargs -n1 -I % wp --url=% media regenerate --skip-delete --only-missing --yes
# Delete user from Multisite. Reassign should be wp-admin's user ID. 83 is for forms.bellevuecollege.edu
wp site list --field=url | xargs -n1 -I % wp --url=% user delete 38 --reassign=83
wp user delete 38 --network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment