• My site has had a lot of crazy traffic (we were actually getting charged for GPU overages by our host during the quietest time of the year for our site) so I started looking into broken links. I installed the Broken Link Checker and started running it last week. It hasn’t stopped collecting broken links and redirects (all spam) since then. If I leave it running, it adds another ~5000 overnight.

    Here’s what I’ve tried so far:

    • Turning off comments and trackbacks via my WP Dashboard
    • Deleting all the comments on my site via an SQL command
    • Turning off comments on past posts & pages via an SQL command
    • Deleting all trackbacks from my site via an SQL command
    • Manually bulk editing all my past pages and posts to turn comments off

    Those things have effectively stopped the huge spam comment problem; there have been no new ones since I did that. But these broken, spammy links just keep on coming in my Broken Link Checker. Anything else I can try? And any way I can bulk delete these ~6000 I currently have without going through 30 links at a time (I tried upping the # of links per page but it doesn’t seem to actually delete anything above 30, times out, etc.)?

    Thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter waxpop

    (@waxpop)

    Bump?

    Since this post, I’ve also added code from this post to my functions.php file, since I saw that I had a ton of comments on images.

    add_filter( 'comments_open', 'no_media_comments', 10, 2 );
    
    function no_media_comments( $open, $post_id ) {
    
    	$post = get_post( $post_id );
    // wordpress refers to images as attachments
    	if ( 'attachment' == $post->post_type )
    		$open = false;
    
    	return $open;
    }

    Not sure if that code is doing what it’s supposed to since I logged in today and I had 8 more pending comments on photos.

Viewing 1 replies (of 1 total)
  • The topic ‘Neverending broken links & redirects’ is closed to new replies.