Latest Tech and Tips

How to Stop Storing IP Address in WordPress Comments


After reviewing our post on how to enable confidential comments, among our viewers asked us if it was feasible to stop storing IP address in WordPress comments. Some website proprietors might desire to do that to shield personal privacy of their customers. In this post, we will certainly reveal you how to stop storing IP address in WordPress comments.

Comment Privacy in WordPress

Pros as well as Cons of Not Storing IP Address in WordPress Comments

By default, WordPress logs as well as shops IP addresses of customers leaving talk about your internet site. These IP addresses are completely saved in your data source.

The factor for storing IP addresses with each remark is to assistance website proprietors battle with undesirable comments or spam. Plugins like Akismet can obstruct comments from IP addresses understood to be manipulated by spammers.

Unless your customers are making use of a VPN solution, their genuine IP addresses can still be discovered in your website logs. Most WordPress holding carriers maintain a gain access to log of all site visitors to your internet site for a minimal amount of time.

On the various other hand by not storing IP address in WordPress comments, you can boost personal privacy of commenters on your internet site. They might really feel a lot more positive concerning sharing their point of views understanding that your website does not shop IP addresses with comments.

Method 1: Stop Storing IP Addresses in Comments with Plugin

This technique is simpler as well as advised for brand-new internet sites as well as newbies.

First point you require to do is set up as well as trigger the Remove IP plugin. For even more information, see our detailed overview on how to set up a WordPress plugin.

Once triggered, the plugin will certainly change individual IP with, which is an IP address generally utilized by localhost.

The plugin will certainly not erase IP addresses saved with older comments. If you have older comments with IP addresses saved with them, after that you might desire to erase those IP addresses also. We will certainly reveal you how to do that later on in this post.

Method 2: Manually Stop Storing IP Addresses with WordPress Comments

If you fit pasting code bits in WordPress, after that you need to utilize this technique rather.

Simply include this code to your style’s functions.php documents or a site-specific plugin.

feature wpb_remove_commentsip( $comment_author_ip) {
add_filter( 'pre_comment_user_ip', 'wpb_remove_commentsip' );.

This is essentially the exact same code utilized by the plugin we pointed out in the initial technique. However, as opposed to storing, it leaves the IP area space.

Remove IP Address From Old Comments

Regardless of which technique you utilize to stop storing comments IP, old talk about your WordPress website will certainly constantly have IP addresses saved with them.

If you have old talk about your website, after that you might desire to get rid of IP addresses from those comments.

We will certainly reveal you how to do that by running a MySQL question on your WordPress data source. It is actually crucial to make certain that you have one of the most current WordPress data source back-up.

Next you require to login to your WordPress holding control board as well as try to find phpMyAdmin.

Make certain that you have actually chosen your WordPress data source by clicking the data source name in the column on your left hand. After that you require to click the SQL food selection.

Removing IP address from old comments in WordPress

This will certainly bring you a message location where you require to enter this question:

UPGRADE 'wp_comments' SET 'comment_author_IP' =";.

Click on the Go switch listed below the textarea to run your question. That’s all, it will certainly get rid of all IP addresses saved with comments in WordPress data source.

Note: if you have a custom-made WordPress data source prefix, after that please readjust the wp_comments to your customized table prefix.

We wish this post assisted you find out how to stop storing IP address in WordPress comments. You might additionally desire to see our overview on how to include ask me anything anonymously in WordPress.

If you liked this post, after that please subscribe to our YouTube Channel for WordPress video clip tutorials. You can additionally locate us on Twitter as well as Facebook.