Delete All Pending Comments
wp comment trash $(wp comment list –status=hold –format=ids)
Reference:
https://gist.github.com/dangtrinhnt/561698963c88affb4992
by Skyler
by Skyler
by Skyler
by Skyler
mysql -u username -p database_name < sql_file.sql
Reference:
https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql#answer-17666279by Skyler
Change a file’s user and group designation
chown myuser:mygroup file
Reference:
https://unix.stackexchange.com/questions/383720/how-to-perform-chown-and-chgrp-in-one-command
by Skyler
This block can be added to the profile, .bash_profile, or .bashrc to make certain SSH-specific tasks easier to manage.
# Sets standard 755/644 permissions in current directory's contents
alias fixperms="find . -type f -exec chmod 644 {} + && find . -type d -exec chmod 755 {} +"
alias lsl="ls -lah"
# The next alias modifies the output of ls -lah to include numerical permissions
alias lsn="ls -lah | awk '{k=0;for(i=0;i<=8;i++)k+=((substr(\$1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(\"%0o \",k);print}'"
# Inserts Rowdy's qwpcli
alias qwp='. <(curl -sS https://raw.githubusercontent.com/sos12/Quick-WP-CLI/master/qwpcli)'
# Installs a fresh copy of WordPress
alias wpnew="wget https://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz && mv wordpress/* ./ && rmdir ./wordpress/ && rm -f latest.tar.gz"
# Command to count all of the inodes in the current directory
# Sums up all of the subdir contents
alias count="find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr"
# shows a sorted list of the size of each item and its contents
alias duu="du -hs * | sort -h"