• Hi,

    I’ve had my blog running for almost 3 years now. When I first started, I let anyone make comments. I made a “prohibitive number” of posts with these settings, as in, I don’t want to make 1-by-1 changes. As comment spam became an increasing problem, I changed my settings so that only registered users can post comments. This has worked for all new posts added since I made that change, but the old posts still allow anybody to comment.

    I’m comfortable with SQL syntax, and I went digging through the database to try to figure out if I can update the old posts manually, but I became skeptical that I was doing “the right thing”.

    Can anybody tell me how to change the comment settings on ALL my posts such that only registered users can comment?

    Thanks!
    -Jon

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    What setting did you change to only allow registered users to comment? I’m not aware of any such setting on a per-post basis. I think you just go to Options->General and turn on “Users must be registered and logged in to comment”. It’s global, not per-post.

    As for spam, none of these options fight spam. Not really. Spammers don’t use the comment system, as a general rule. What you need is a spam fighting plugin to fight spam effectively. Bad Behavior is very good, as is Akismet. Both in combination stops virtually all spam.

    Thread Starter jonmccune

    (@jonmccune)

    That global option is indeed the one I changed. However, I get emails from the wordpress software asking me to moderate a comment. This only happens for older posts that I made before I enabled the global “Users must be logged in and registered to comment” option. The emails look like this one, though I changed the hostname:

    A new comment on the post #24 “Widgets!” is waiting for your approval
    http://myhost.domain.com/wordpress/?p=24

    Author : Cheap Cialis (IP: 88.208.211.186 , server88-208-211-186.live-servers.net)
    E-mail :
    URL : http://www.google.com/base/a/1508697/D15112476358064600609
    Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=88.208.211.186
    Comment:
    Cheap Cialis…

    Is that a template? If not your a great designer!…

    Approve it: http://myhost.domain.com/wordpress/wp-admin/comment.php?action=mac&c=2782
    Delete it: http://myhost.domain.com/wordpress/wp-admin/comment.php?action=cdc&c=2782
    Spam it: http://myhost.domain.com/wordpress/wp-admin/comment.php?action=cdc&dt=spam&c=2782
    Currently 22 comments are waiting for approval. Please visit the moderation panel:
    http://myhost.domain.com/wordpress/wp-admin/moderation.php

    Now, I believe there was no user logged in. I only have about 5 users, and I know each of them.

    I think that I should never get one of these comment-approval emails unless a new (malicious) user has registered first.

    Does this clarify my problem at all?

    Thanks,
    -Jon

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    That’s probably a trackback, not a comment. Spammers (ab)use the trackback mechanism to automate submission of their spam. Most themes and such display both comments and trackbacks/pingbacks all in the same space.

    Bad Behavior and Akismet both will recognize spam in trackbacks as well as comments.

    Thread Starter jonmccune

    (@jonmccune)

    I see. However, I have “Allow link notifications from other websites (pingbacks and trackbacks)” disabled in Options : Discussion. So perhaps it is with respect to pingbacks and trackbacks that I need to change some properties of my older posts?

    In Options : Discussion, it does say “These settings may be overridden for individual articles.”. I believe my old articles have those settings ‘grandfathered in’.

    I am interested in preventing these kinds of discussion, rather than filtering the spam.

    Thanks,
    -Jon

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Right, now that is indeed a per-post setting. I’ll tell you what to change in the database, but I strongly urge you to reconsider this approach and to use spam blocking plugins like Bad Behavior and Akismet instead. Bad Behavior has the nice side effect of blocking spammers from hitting your site at all, thus reducing CPU and database load, while Akismet helps everybody fight spam by communicating with the centralized Akismet server, improving spam recognition methods. With these methods, you can indeed go back to letting anybody post without worrying about spam to any great degree. They work incredibly well.

    Still, here’s what you change in the database to disable trackbacks/pingbacks on a per post basis: The wp_posts table should have a column called “ping_status”. Change it to “closed” for all the rows.
    Or, in SQL:
    UPDATE wp_posts SET ping_status = “closed” WHERE 1=1;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Requirements to write Comments on Posts’ is closed to new replies.