Delete self-pings
It seems that self-pings are bad for Google page ranking. Well, I have never spended too much time thinking about SEO but I find them a bit clutering and thus I’ve decided to remove them. There are some plugins which block new self-pings but none which deletes the existing ones. So here is a mysql command which does just that:
Warning: don’t execute sql commands on your db if you don’t know anything about what sql is, it might ruin your base.
SELECT count(*) FROM {prefix}_comments WHERE comment_type = 'pingback' AND locate((SELECT option_value FROM {prefix}_options WHERE option_name = 'siteurl'), comment_author_url) = 1; DELETE FROM {prefix}_comments WHERE comment_type = 'pingback' AND locate((SELECT option_value FROM {prefix}_options WHERE option_name = 'siteurl'), comment_author_url) = 1;
Replace the {prefix} with your db tables prefix.


Recent Comments