Hello everyone,
I'm using a translator, so I hope this will be understandable.
One of my subscribers has asked for their account to be deleted so they can create a new one with a different email address and username.
The problem is that all their old comments are still in the database, but I don't know if it's possible to link the old comments to their new account.
I hope I've managed to make myself clear. 😁
Thanks,
Christophe
Hi,
Please provide us with the following information:
- The ID of the old user account
- The ID of the new account
- Let us know whether you have any wpDiscuz add-ons installed
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Hello,
The old ID was: 862
The new one is: 2125
And yes, I use two extensions:
wpDiscuz - Emoticons
and
wpDiscuz - Online Users
Thanks
Christophe
Please follow the steps below:
1. Back up your database first, so you can restore the website if anything goes wrong.
2. Execute the SQL queries below:
UPDATE `wp_comments` SET `user_id` = 2125, `comment_author_email` = 'new_user_email' WHERE `comment_author_email` = 'old_user_email' AND `user_id` = 862; UPDATE `wp_comments` SET `user_id` = 2125, `comment_author_email` = 'new_user_email' WHERE `comment_author_email` = 'old_user_email' AND `user_id` = 0; UPDATE `wp_comments` SET `comment_author_email` = 'new_user_email' WHERE `comment_author_email` = 'old_user_email'; UPDATE `wp_commentmeta` SET `meta_value` = 'new_user_email' WHERE `meta_key` = 'wpdiscuz_last_edited_by' AND `meta_value` = 'old_user_email'; UPDATE `wp_wc_comments_subscription` SET `email` = 'new_user_email' WHERE `email` = 'old_user_email'; UPDATE `wp_wc_follow_users` SET `follower_id` = 2125, `email` = 'new_user_email' WHERE `user_id` = 862; UPDATE `wp_wc_follow_users` SET `follower_id` = 2125, `follower_email` = 'new_user_email' WHERE `follower_id` = 862; DELETE FROM `wp_wc_online_users` WHERE `user_id` = 862;
In the SQL code, please replace new_user_email and old_user_email with the corresponding values.
This video tutorial should also be helpful:
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Hello,
Thank you for your assistance.
I'd rather leave it at that. I didn't imagine I'd have to perform such a complex maneuver, and I don't want to crash my site.
For your information, the video is not displaying.
Thank you,
Christophe
I'd rather leave it at that. I didn't imagine I'd have to perform such a complex maneuver, and I don't want to crash my site.
Please keep us informed if you have any further questions. For now, we'll mark this thread as solved.
For your information, the video is not displaying.
Thank you for letting us know — we’ll definitely check this.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

