How to Stop Storing IP Address in WordPress Comments

After studying our article on the best way to enable nameless feedback, one in all our readers requested us if it was potential to cease storing IP address in WordPress feedback. Some web site house owners could wish to do this to guard privateness of their customers. On this article, we are going to present you the best way to cease storing IP address in WordPress feedback.

Execs and Cons of Not Storing IP Handle in WordPress Feedback

By default, WordPress logs and shops IP addresses of customers leaving feedback in your web site. These IP addresses are completely saved in your database.

The explanation for storing IP addresses with every remark is to assist web site house owners fight with undesirable feedback or spam. Plugins like Akismet can block feedback from IP addresses identified to be exploited by spammers.

Until your customers are utilizing a VPN service, their actual IP addresses can nonetheless be present in your web site logs. Most WordPress internet hosting suppliers hold an entry log of all guests to your web site for a restricted time period.

Alternatively by not storing IP address in WordPress feedback, you possibly can enhance privateness of commenters in your web site. They might really feel extra assured about expressing their opinions realizing that your web site doesn’t retailer IP addresses with feedback.

Technique 1: Cease Storing IP Addresses in Feedback with Plugin

This technique is simpler and beneficial for brand new web sites and rookies.

Very first thing you must do is set up and activate the Take away IP plugin. For extra particulars, see our step-by-step information on the best way to set up a WordPress plugin.

As soon as activated, the plugin will change person IP with, which is an IP address  usually utilized by localhost.

The plugin is not going to delete IP addresses saved with older feedback. When you have older feedback with IP addresses saved with them, then you could wish to delete these IP addresses as properly. We are going to present you the way to do this later on this article.

Technique 2: Manually Cease Storing IP Addresses with WordPress Feedback

If you’re comfy pasting code snippets in WordPress, then you must use this technique as an alternative.

Merely add this code to your theme’s capabilities.php file or a site-specific plugin.

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

That is mainly the identical code utilized by the plugin we talked about within the first technique. Nonetheless, as an alternative of storing, it leaves the IP subject clean.

Take away IP Handle From Outdated Feedback

No matter which technique you employ to cease storing feedback IP, outdated feedback in your WordPress web site will at all times have IP addresses saved with them.

When you have outdated feedback in your web site, then you could wish to take away IP addresses from these feedback.

We are going to present you the way to do this by working a MySQL question in your WordPress database. It’s actually vital to just remember to have the newest WordPress database backup.

Subsequent you must login to your WordPress internet hosting management panel and search for phpMyAdmin.

Just remember to have chosen your WordPress database by clicking on the database identify within the column in your left hand. After that you must click on on the SQL menu.

This can deliver you a textual content space the place you must enter this question:

UPDATE 'wp_comments' SET 'comment_author_IP' = '';

Click on on the Go button beneath the textarea to run your question. That’s all, it should take away all IP addresses saved with feedback in WordPress database.

Be aware: you probably havecustomized WordPress database prefix, then please alter the wp_comments to your customized desk prefix.

You May Also Like : How to Create a List of Forbidden Words for WordPress Titles

We hope this text helped you discover ways to cease storing IP address  in WordPress feedback. You may additionally wish to see our information on the best way to add ask me something anonymously in WordPress.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.

1 thought on “How to Stop Storing IP Address in WordPress Comments”

  1. Pingback: How to Connect Constant Contact to WordPress (Step by Step)

Leave a Comment

Your email address will not be published. Required fields are marked *