*#$!^&*! Spam

I hadn’t been blogging much, so I didn’t realize that I was getting slammed with trackback and pingback spam. After my last post, I noticed that there were over 800 comments. I knew this was going to just about all be spam, so I had to figure out what was happening. Since I had already turned off comments, I knew that wasn’t how it was coming in. I went to the dashboard and noticed that pingbacks and trackbacks were still on, so I turned them off and thought I was finished. Only after deleting the over 800 comments, did I see them keep coming. So I had to do a little more research to find that the checkboxes only turned off trackbacks and pingbacks for future posts. The earlier posts still had it on, which is why I kept getting the spam. These had to be turned off manually, which was going to be a pain, since I have a number of posts. But then I found a simple mysql command to turn them all off at once.

mysql> use blog;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update wp_posts set ping_status="closed";
Query OK, 430 rows affected (0.01 sec)
Rows matched: 432  Changed: 430  Warnings: 0