Delete Spam Comments in Bulk Without Plugin on Cloudways
By Divi Dude
Sometimes you screw up and forget to turn off comments on your WordPress website, or forget to configure your Askimet, or do both, and then you end up with thousands of comments that are nothing but spam. We’re talking hundreds of pages worth of comments that need to be deleted.
I’m not saying that happened to me with my work-in-progress Game of Thrones Divi website. I’m not saying that in the course of 1 week, I got more than 5,000 spam comments. I’m just saying sometimes it happens, and when it does, deleting the spam comments in bulk is relatively easy without having to resort to adding another plugin to your website.
There’s a video towards the bottom of the page, if you prefer to get your tutorials that way.
I use Cloudways as my server. And if you are serious about designing websites for you and your clients, then I recommend you use Cloudways too. I wrote an article on why I use Cloudways instead of a less expensive shared hosting plan that you should read. But I digress.
If you’re on another server, the principles remain the same; it’s just the way to get there will be slightly different depending on how you edit your MySQL database, most likely you will use phpMyAdmin.
This is how to delete your comments in bulk on Cloudways:
- Back up your database in case something goes wrong. (You can export it under settings, or duplicate the site using a plugin like Duplicator, or create a clone or staging site on Cloudways).
- Launch your application (another word for WordPress website).
- When the application is launched, make sure you click on the Access Details on the left-hand menu (it should have defaulted there, but if not, click on it).
- On the bottom is a green button that reads: “Launch Database Manager.” Click on it.
- Look for the wp_comments table and click on it.
- Click on the “Select Data” link on top.
- Scroll down to the bottom and check the box that reads: “Whole Results”.
- Click on the green Delete Button.
- Return to the table by clicking on the database name up top in the breadcrumbs menu in the blue section. (or just hit the back button a couple of times until you are in the database manager again).
- Look for wp_commentmeta and click on it.
- Repeat steps 6 & 7.
- That’s it. Close the screen.
When you go back to your WordPress website’s dashboard and hit refresh, all the comments will be gone.
Helpful Tips to Avoid Spam Comments
If you don’t want to comments, make sure to turn them off on your website. Do this by going to the Settings > Discussion and unchecking the box that reads: “Allow people to post comments on new articles.” Also, be sure to check the box that reads: “Comment must be manually approved” in case any still do appear, or if you do allow comments on your website.
WordPress comes with the plugin Askimet Anti-Spam. Make use of it. Sign up for an API key and make sure the plugin is activated.
MAKE YOUR DIVI LIFE EASIER
Divi Booster is a Divi plugin that just makes your life as a website developer easier. It adds about 50 functions to the already impressive Divi WordPress theme. Want an example? Here’s a video I did showing the long way and the short way to add additional social media pages to your Divi theme (guess which plugin I used to show the short way). But it doesn’t just help with social media, it also allows you to make adjustments to sliders, headers, posts, pages, modules … like I wrote above, it does about 50 things (I write “about” because it is continuously updated with more functions). $29.
More From Divi Dude
Here’s the dilemma. When I build websites, I build them primarily for a landscape screen. Most of my photos are optimized for landscape screens. My Facebook and Twitter graphics are for landscape screens. But Pinterest prefers portrait style graphics for its pin boards. See the problem? My website has graphics that are wider than they are long (landscape). Yet, Pinterest wants graphics that are taller than they are wide (portrait).
This is one of those plugins that’s only going to appeal to a certain number of people. People like me who have a need to add syntax code to websites. But if you’re one of those people, then I recommend you get the plugin — Divi Code Snippet Module — from the creator of Divi Booster. I tried 3 or 4 plugins in WordPress, every one of them …