How to Stop Storing IP Address in WordPress Comments

After reading our article on how to allow anonymous comments, one of our readers asked us if it was possible to stop storing IP address in WordPress comments. Some site owners may want to do that to protect privacy of their users. In this article,… Read More »

The post How to Stop Storing IP Address in WordPress Comments appeared first on WPBeginner.

After reading our article on how to allow anonymous comments, one of our readers asked us if it was possible to stop storing IP address in WordPress comments. Some site owners may want to do that to protect privacy of their users. In this article, we will show you how to stop storing IP address in WordPress comments.

Comment Privacy in WordPress

Pros and Cons of Not Storing IP Address in WordPress Comments

By default, WordPress logs and stores IP addresses of users leaving comments on your website. These IP addresses are permanently stored in your database.

The reason for storing IP addresses with each comment is to help site owners combat with unwanted comments or spam. Plugins like Akismet can block comments from IP addresses known to be exploited by spammers.

Unless your users are using a VPN service, their real IP addresses can still be found in your site logs. Most WordPress hosting providers keep an access log of all visitors to your website for a limited period of time.

On the other hand by not storing IP address in WordPress comments, you can improve privacy of commenters on your website. They may feel more confident about expressing their opinions knowing that your site doesn’t store IP addresses with comments.

Method 1: Stop Storing IP Addresses in Comments with Plugin

This method is easier and recommended for new websites and beginners.

First thing you need to do is install and activate the Remove IP plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Once activated, the plugin will replace user IP with 127.0.0.1, which is an IP address typically used by localhost.

The plugin will not delete IP addresses stored with older comments. If you have older comments with IP addresses stored with them, then you may want to delete those IP addresses as well. We will show you how to do that later in this article.

Method 2: Manually Stop Storing IP Addresses with WordPress Comments

If you are comfortable pasting code snippets in WordPress, then you should use this method instead.

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

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

This is basically the same code used by the plugin we mentioned in the first method. However, instead of storing 127.0.0.1, it leaves the IP field blank.

Remove IP Address From Old Comments

Regardless of which method you use to stop storing comments IP, old comments on your WordPress site will always have IP addresses stored with them.

If you have old comments on your site, then you may want to remove IP addresses from those comments.

We will show you how to do that by running a MySQL query on your WordPress database. It is really important to make sure that you have the most recent WordPress database backup.

Next you need to login to your WordPress hosting control panel and look for phpMyAdmin.

Make sure that you have selected your WordPress database by clicking on the database name in the column on your left hand. After that you need to click on the SQL menu.

Removing IP address from old comments in WordPress

This will bring you a text area where you need to enter this query:

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

Click on the Go button below the textarea to run your query. That’s all, it will remove all IP addresses stored with comments in WordPress database.

Note: if you have a custom WordPress database prefix, then please adjust the wp_comments to your custom table prefix.

We hope this article helped you learn how to stop storing IP address in WordPress comments. You may also want to see our guide on how to add ask me anything anonymously in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Stop Storing IP Address in WordPress Comments appeared first on WPBeginner.

How to Improve Default WordPress Comments with wpDiscuz

In most WordPress themes comments and the comment form section are quite boring. Improving the interface can increase your user engagement. In this article, we will show you how to improve default WordPress comments with wpDiscuz. Why Use wpDiscuz? Often users feel that the default… Read More »

The post How to Improve Default WordPress Comments with wpDiscuz appeared first on WPBeginner.

In most WordPress themes comments and the comment form section are quite boring. Improving the interface can increase your user engagement. In this article, we will show you how to improve default WordPress comments with wpDiscuz.

wpDiscuz Comments

Why Use wpDiscuz?

Often users feel that the default WordPress comment system looks outdated which is true. For example, users cannot vote on comments, share them, or subscribe to comment replies.

Comment form layout is also the most ignored part in most WordPress themes. Tiny user interface enhancements can actually make a huge impact on how people comment on your site. A plain looking web form is not appealing and encouraging.

This is why users move away to third party commenting systems like Disqus. We tried Disqus on WPBeginner, but we switched away because it decreased engagement and total comments – see Disqus review.

WPDiscuz provides an alternate to Disqus, JetPack, and the default WordPress comments. WPDicuz allows you to have all the most desired features while still using the native WordPress comment system.

How to Setup wpDiscuz

First thing you need to do is install and activate the wpDiscuz plugin. Upon activation, simply click on wpDiscuz icon in WordPress admin bar to configure the plugin settings.

wpDiscuz settings page

The default plugin settings should work for most websites. There are options to turn on/off each feature of the plugin.

The plugin can show newer comments just as they appear. However, this setting is turned off by default. If you are using a shared WordPress hosting, then you should keep it that way. The plugin can still automatically look and fetch newer comments on regular time intervals.

Once you are done, simply click on the save changes button to store your settings.

Changing Plugin Messages

WpDiscuz also allows you to change the text displayed for the comments interface. Simply click on WpDiscuz » Phrases to edit these phrases.

wpDiscuz front-end text strings

This feature is particularly useful if you want to change any default text displayed by the plugin. You can also use it to translate the comment form interface into another language.

wpDiscuz vs De:comments

wpDiscuz is not the only comment enhancement plugin for WordPress. A powerful premium candidate in this arena is De:comments. See our tutorial on how to improve WordPress comments with De:comments to learn more about it.

Both wpDiscuz and De:comments do a great job at enhancing the commenting experience on a WordPress site. However, we felt that De:comments is faster so we decided to test both plugins with same comments and theme. Here are the results of our tests:

Comment Plugin Page Load time Requests Page size
De:comments 3.23s 31 1.2 MB
wpDiscuz 5.55s 47 1.2 MB

As you can see De:comments is much faster than wpDiscuz and since speed is an important SEO factor, you cannot ignore this.

One advantage of using wpDiscuz is that it is free. De:comments on the other hand is a premium plugin, and a single site license costs $50 with one year of updates and support.

That’s all, we hope this article helped you add a better commenting experience to your WordPress site. You may also want to check out our list of 12 vital tips to combat comment spam in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Improve Default WordPress Comments with wpDiscuz appeared first on WPBeginner.