• I was getting some spam comments, and I took the advice of a lot of posters on this board and changed the names of a few of my files to prevent comments from cropping up. I’ve not had a spam comment in weeks — until today.
    I wrote a new entry today and saved it. Then I went to view the post and there was a spam comment in that post that I made not two seconds earlier.
    How can this be?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Changing a filename is not infallible.
    Check out more defences, and in answer, TG’s code.
    https://www.tamba2.org.uk/wordpress/spam/

    Thread Starter cilibrin

    (@cilibrin)

    True, but it seems bizarre that the comment was posted the second I saved the doc…

    The comment was already there.. it just needed to be matched with a post ID.
    TG’s code stops that.

    Thread Starter cilibrin

    (@cilibrin)

    Thanks much! Keep up the great work WordPress!

    Thread Starter cilibrin

    (@cilibrin)

    Hmm, I added the TG code and gave it a test. I’m still getting comment spam whenever I create a new post. Any thoughts?

    TG’s code stops any more being put in there – it doesn’t delete what is already there.
    You can either: use phpmyadmin to go into the database and delete it that way, or anticipate this with each post for a while and delete it quickly, or keep posting test posts until they stop.

    Thread Starter cilibrin

    (@cilibrin)

    I’d like to go into phpmyadmin and delete it. But I’m not sure what “it” is. Sorry if this is a boneheaded question, but what should I be looking to delete?

    I would look inside the table ‘wp_comments’
    I haven’t done so, but I assume they go in order from the first comment you go all the way up to today, so find what you don’t like, and delete them.
    phpmyadmin is strong stuff – if you are even slightly unsure, then backup your database FIRST.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Bizarre spam comment’ is closed to new replies.