WordPress: Remove IP-Logging on WordPress Comments (Solution)

12. Dezember 2016 at 13:39

Wordpress logo

Add this to your functions.php:

add_filter('pre_comment_user_ip', 'no_ips');
function no_ips($comment_author_ip){
    return '';
}

You’ll still have the comment_author_IP field in the db, but it will be empty…

And to remove existing IP records from the db run this query:

UPDATE `wp_comments` SET `comment_author_IP` = ''

Please share this article von facebook & google plus or where you want, thank you!