Last active
September 10, 2020 00:13
-
-
Save yusufhm/984c819eaeadf43678f5f8be280ca964 to your computer and use it in GitHub Desktop.
wp-cli commands
This file contains 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
#!/usr/bin/env bash | |
# Create an admin user. | |
wp user create username user@example.com --role=administrator | |
# Reset user password. | |
wp user update user --user_pass=password --skip-email | |
# Create a database backup. | |
wp db export - | gzip -9 > db.sql.gz | |
# Drop the database. | |
wp db drop | |
# Re-create the database. | |
wp db create | |
# Load a database. | |
gunzip -c db.sql.gz | wp db query | |
# Update site url. | |
wp option update home 'http://my-new.url' | |
wp option update siteurl 'http://my-new.url' | |
# Flush cache | |
wp cache flush | |
# Delete all transients. | |
wp transient delete --all | |
# Run Quttera internal scan. | |
wp cron event run qtr_internal_scan_cron_hook | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment