How to Delete All Existing Comment Author URLs in WordPress

Posted in Wordpress Development on 13 May 2012 1 comment

I have been getting spam comments for years. Although I already installed Akismet plugin to block most of the spams, I am still getting a plenty of them everyday. As I can see in recent years, at least 20% of my site comments are “fake” comments with keyword links as the commentor name.

Although nofollow links don’t take your link juice away from your site, it does reduces the link juice passed to your dofollow links. So, it is best to remove all unwanted links, including nofollow links.

Mass delete all existing comment author URLs for WordPress Site

While we might have some WordPress plugins that can do this for you. I prefer doing it manually via phpMyAdmin. Go to your phpMyAdmin or any SQL administration tool that allow you to run queries to your database.

1. Select your WordPress installation’s database
2. Go to “SQL” tab.
3. Enter any of the following queries.
4. If your table prefix is not “wp_”, change it accordingly.

To delete ALL comment urls

Here we just set the URL value to empty. So no worries about losing your comment.

UPDATE wp_comments SET comment_author_url = '';

To delete ALL comment urls EXCEPT a certain link

I used this query to avoid deleting URL of those comments made by me myself.

UPDATE wp_comments SET comment_author_url = '' WHERE NOT comment_author_url = 'http://zenverse.net/';

Now I am feeling good having less outgoing links. Hope this helps :)

 

Posted by Zen on 13 May 2012 • 59,303 visits 1 comment
Tags :


or Subscribe to specific category only :




  - 1 Comments


Thank you for this SQL info. I installed PHPMyAdmin and fixed over 700 spam from russia (not with love). I actually left in the comments and simply pointed it the urls to another site I own. I thank the spammers for filling my comments up with starter stuff, and I hope the links help my other site.

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Previous Post
«
Next Post
»