Removing existing comment IPs.
I currently see no way to do this. I might need to export, edit all the IPs from the XML file then import.
I don't know how to remove old comment IPs. I found a post with some hints:
#!/bin/sh \echo "\ UPDATE wp_comments \ SET comment_author_IP='0.0.0.0' \ WHERE comment_author_IP != '0.0.0.0' \ AND TIMESTAMPDIFF(DAY, comment_date, CURRENT_TIMESTAMP) >= 7;" |\ \mysql --defaults-file=/home/<username>/.my.cnf <wordpress database name>
This script executes a SQL command which checks the timestamp and the author's IP address of all comments in the comments table (
- If a comment is older than seven days and its IP address is not 0.0.0.0 it'll be set so.
--defaults-file=/home/<username>/.my.cnfis needed because when the script is called by
mysqlcommand won't find the user's
.my.cnffile without this option.
In this file the MySQL user password is saved.
Note that the IP addresses might still be stored in backups of the database or emails send to you by WordPress.
It'd be great if someone with experience in writing WordPress plugins would implement this small SQL command in a plugin so users wouldn't need to deal with