Monday, November 23, 2020
Home Blogging How to Stop Storing IP Address in WordPress Comments

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 127.0.0.1, 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.

1
2
3
4
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 127.0.0.1, 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:

1
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 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

50 Best Online Jobs From Home For Students – Earn 20K PM

In latest years, the alternatives for online jobs from home for students have gained great reputation. This is as a result of many of the...

Best Answers to the Question “Why should you be hired for this Internship?”

What is the greatest approach to ace an internship interview? Especially for a more energizing who has by no means appeared for a job-related...

Does Instagram Notify You if Someone Screenshots Your Story?

When Snapchat first burst on the scene, there have been loads of individuals very completely happy concerning the prospect of sending pictures to people...

How to Change Background Color on Instagram Story

It's arduous for me to recollect Instagram earlier than the tales characteristic was launched — it is a simple possibility for sharing updates and...

Recent Comments