Created
October 26, 2020 16:18
-
-
Save reikoNeko/828330df37f2c27508306e0ebc97c520 to your computer and use it in GitHub Desktop.
WP-CLI commands for multisite installations
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
#### Comment Spam prevention | |
# Disable comments on all blogs | |
site_list=`wp site list | cut -f 1 | grep -v blog` | |
for U in $site_list; do wp db query "update wp_${U}_options set option_value='closed' where option_name='default_comment_status';" ; done | |
for U in $site_list; do wp db query "update wp_${U}_options set option_value=0 where option_name='close_comments_days_old';" ; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment