Last active
November 19, 2019 23:02
-
-
Save greenweb/11188ad11f11ae41463172aa4c6e7d36 to your computer and use it in GitHub Desktop.
wpcli stuff
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
# wpcli stuff | |
alias wpbackdb="wp db export --color ~/backups/\"$(date '+%F').wpdb.sql\" --path='/var/www/html/'" | |
alias wdbup="wpbackdb" | |
alias wpbackupfiles="tar -v -czf ~/backups/wp-website-$(date '+%F').tar.gz /var/www/html/" | |
alias backup='wdbup && wpbackupfiles' | |
alias backupsmall="tar -czf ~/backups/wp-website-$(date '+%F').tar.gz /var/www/html/ --exclude=wp-content" | |
alias backupdb="wdbup" | |
# update plugins via sudo as user www-data | |
alias wpu="sudo -u www-data wp plugin update --all --path='/var/www/html/'" | |
alias wtu="sudo -u www-data wp theme update --all --path='/var/www/html/'" | |
alias wcu="sudo -u www-data wp core update --path='/var/www/html/'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment