Posts

Showing posts with the label spam

Disabling spam email notification of AntispamBee plugin in WordPress multisite

Antispam Bee is a great spam filtering plugin for WordPress. It's free of charge and ad-free. But the thing is when you apply it for your network, a WordPress multisite with hundred or thousand of blogs, you have to set it up one-by-one. Luckily, I found an easy way to apply the default settings of Antispam Bee for all the blogs, such as disable the spam email notifications or even delete the spam without sending it to the spam folder. It's quite easy, you just need to open the  antispam_bee.php  (/path/to/your/wordpress/wp-content/plugins/antispam-bee/) file and modify these lines as following (around line #370, #371):                                 'flag_spam'             => 0,                                 'email_notify'          => 0,

Delete all pending/spam/trash comments from WordPress (Single or Multisite) using WP-CLI

I just wrote this bash shell script to delete all pending/spam/trash comments from WordPress (Single or Multisite) using WP-CLI: Put the script inside your WordPress root and run: $ ./clean_comments.sh These are available statuses of a comment: approve : approved comments hold : pending comments spam : spams trash : comments in the trash bin This is pretty neat huh?!

Cleaning up your WordPress Multisite instance with wp-cli

At some points in life, your WordPress Multisite will become too big and needs to be cleaned up, things like spam comments, revisions, transients... And of-course, you don't want to go blog by blog to clean up all those things. It may take days or weeks if you have > 1000 sites like mine. Here is your savior: WP-CLI WP-CLI is a command line tool which can help you manage your WordPress site flawlessly (:D). This blog post will show you how to use wp-cli to clean up your WordPress Multisite including: 1. Transients: Create a shell script inside your WordPress dir root: $ cd /path/to/wordpress/root $ sudo nano clean_transients.sh #!/bin/bash for url in $(wp site list --field=url --allow-root) do   echo $url #used for progress purposes   wp transient delete-all --url=$url --allow-root done $ sudo chmod +x clean_transients.sh $ sudo ./clean_transients.sh --allow-root 2. Spam comments: $ cd /path/to/wordpress/root $ sudo nano clean_comments.sh ...