try another color:
try another fontsize: 60% 70% 80% 90%

Drupal Comment Spam Problem

Drupal is bumming me out lately, I got a call from Godaddy stating that my site was under quarantine due to database overuse. Turns out I was being uberspammed and had thousands of junk comments. This happened because I wasn't receiving moderation emails and hadn't setup a CAPTCHA or required registration for commenting. Bummer... there are plugins out there to help with this, do the extra work and install one.

...So after restoring the database for that site to an earlier version (which was still full of crappy spam) I had to go in and manually disable comments. Here's how I did it, and how you can do it to save your own site:

  • Login to your drupal site, go to Administer > Content Types then click on each type of content such as Story or Poll
  • within this section just click the bullet at the top for "Disabled" and completely shut commenting down for each affected type, or all of them. Pages have comments disabled by default.

You don't have to completely disable comments as I'm suggesting here, but if your site has mega spam you might need to in order to fix it... Once things are good again you can add a CAPTCHA or change the settings to keep it from happening again using a plugin.

So What's the NEXT STEP? How do you delete all of those thousands of comments quickly? If your situation is like mine, you might want to delete ALL of your comments instead of poking through for hours checking boxes trying to delete just 99.999% of them... That's no fun. We're going to use phpMyAdmin to empty the table records for comments and save a bunch of time.

  1. I host with Godaddy so keep that in mind. I logged in, went to my hosting accounts, clicked the one I wanted to work with, on the Hosting Control Panel I went to the Databases area and clicked Databases
  2. On the MySQL page I clicked Manage via phpMyAdmin next to the database I wanted to fix
  3. phpMyAdmin opens in a new window and I clicked the "Databases" link in the middle area
  4. Next I clicked the name of the database (the other choice was information schema and I just ignored that)
  5. The page loads with a table containing lots of rows and columns for your database, I scrolled down to the row that says "comments" and clicked the Trash Can icon that says Empty when you hover it. A popup says "are you sure" and you just click yeah, then bam, it's done and your comments are finished.

I've seen some sites talking about running SQL Queries to do this but I think the method above is pretty safe and more reliable for people who aren't as technical. Below is a screenshot of the area I discussed above.

 clearing drupal spam in phpMyAdmin