WebTrickz
TRENDING
  • How to Turn Off the Flashlight on iPhone 12 and 12 Pro
No Result
View All Result
  • News
  • Reviews
  • Social Media
    • Facebook
    • Twitter
    • YouTube
    • Messenger
    • Instagram
    • Snapchat
    • WhatsApp
    • TikTok
  • Apps
  • How To’s
  • Apple
  • iPhone
  • Google
  • Android
  • Mac
SUBSCRIBE
  • News
  • Reviews
  • Social Media
    • Facebook
    • Twitter
    • YouTube
    • Messenger
    • Instagram
    • Snapchat
    • WhatsApp
    • TikTok
  • Apps
  • How To’s
  • Apple
  • iPhone
  • Google
  • Android
  • Mac
No Result
View All Result
WebTrickz
No Result
View All Result
Home Blogging

How to Extract commentators Email address with IP & Name from a post in WordPress [Featured]

Mayur Agarwal by Mayur Agarwal
May 16, 2020
in Blogging, How To's

WP If you’re a blog administrator who frequently organises giveaway and contest, then you’ll find this article really helpful. Making a comment by participants is necessary in most of the giveaways and it becomes really difficult for site admin to randomly draw the winners, if the comments are in large number.

An exclusive way is discovered by us which will allow you to extract the email addresses, IP address and Name of all commentators from a specific post in WordPress.org.

ADVERTISEMENT

Follow the step by step tutorial below carefully to extract Email address:

1. Login to cPanel (of your blog host).

2. Go to phpMyAdmin under Databases section.

3. Select your blog database from the left panel which may be marked as _wrdp1

select your database

4. Click on wp_comments from table in left hand side.

click on wp_comments

5. Now click on “Search” tab.

6. Open Options (in blue), Select comment_author, comment_author_email and comment_author_ip in the fields box. Tick mark ‘DISTINCT’ to remove the exactly similar entries (those with same name, email and IP address).

set parameters in Search

7. Input comment_post_id = xxxx under "Add search conditions (body of the "where" clause):" Replace xxxx with the post ID.

To find Post ID of a post, just login to your blog’s WordPress dashboard. Open ‘Posts’ and point your mouse over the preferred post. You’ll then see a link in the status bar of browser. Just note the no. next to post=xxx (For eg: Here it is 7260) as shown below:

find post id

8. Set Number of rows per page to 1000

9. Display order Ascending

10. Click ‘GO’ button. All queries will be sorted now.

11. Click Export button, select ‘CSV for MS Excel’ and tick mark ‘Save as file’. Click GO.

choose export format

A MS Excel file will now be produced containing all the commentators name, IP and email address from a certain post. You can then find duplicate email and IP addresses and sort the invalid ones using Excel. Then you can copy all the email addresses and use Random.org to draw the giveaway winners.

This guide looks difficult in starting but you’ll find it really easy, once you get used to it. This post is specially for bloggers who conduct big giveaways on their blog. 😀

Do share this tutorial if you find it useful.

Update – Sandip of BlogsDNA has provided us a source code which eliminates 6 steps and makes it real easy to do this task. 😀 Check below how to do it:

ADVERTISEMENT

Go to phpMyAdmin and select your blog database. Now click on “SQL” tab. Input the below SQL query there and click the ‘Go’ button. You’ll now come straight to Step 11.

SELECT DISTINCT comment_author, comment_author_email, comment_author_IP
FROM (
SELECT DISTINCT comment_author, comment_author_email, comment_author_IP
FROM wp_comments
WHERE `comment_post_ID` = ‘xxxx’
) AS WEBTRICKZ

Remember to Replace xxxx with your Post ID.

Tags: GuideTipsTricksTutorialsWordPress
ShareTweetSend
Previous Post

Giveaway – Win Free Licenses of AnyBizSoft PDF Converter

Next Post

How to Block specific websites on computer with Kaspersky

Mayur Agarwal

Mayur Agarwal

Mayur Agarwal is the founder and editor-in-chief of WebTrickz. As a Technology enthusiast and an Internet addict, he loves sharing useful How To’s and Tips & Tricks.

Next Post

How to Block specific websites on computer with Kaspersky

Comments 10

  1. Rohit Langde says:
    11 years ago

    That’s good for someone geeky and used to phpmyadmin interface. As far as I remember, I used Contact Commentators plugin by Ajith Prasad Edassery http://wordpress.org/extend/plugins/contact-commenters/ which does the same thing easy way.

    Reply
    • Avinash says:
      11 years ago

      That looks great but too technical for a simple guy. I use a much simpler method to extract email addresses from comments whenever I hold a contest. Even IP address and name is possible with that.

      But still, phpmyadmin method good for anyone who is comfortable with using phpmyadmin. Good post. 🙂

      Reply
      • Mayur says:
        11 years ago

        As I said, this process looks difficult but is really simple to use. BTW.. what simpler method do you use, any plugin?

        Reply
        • Avinash says:
          11 years ago

          Its not a plugin, just a combination of notepad plus MS excel.

          Reply
  2. Raju says:
    11 years ago

    This is very useful and helpful, especially when there are hundreds of entries, wish you had written this last year 😀

    Reply
    • Mayur says:
      11 years ago

      Thanks Raju for appreciating it. Yes, it is very handy for big giveaways where there are numerous comments. 😀

      Reply
  3. Sandip says:
    11 years ago

    Thanks Mayur,

    lol Ok so it was good laugh for me to teas Mayur with “BLOGSDNA” watermark thingy but well You can replace BLOGSDNA from above query with any thing you like but it should read some thing like “AS XYZ”. 🙂

    Reply
    • Mayur says:
      11 years ago

      Haha… so can I replace BLOGSDNA with WEBTRICKZ with your consent. 😀

      Reply
      • Sandip says:
        11 years ago

        Yeah go ahead. 🙂

        Reply
  4. Pingback: Getting Comment Info from the WordPress Database | Digging into WordPress

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

ADVERTISEMENT

Latest Stories

Record your Screen on Mac with VideoProc | 3 Flexible Modes

March 4, 2021
remove call silencing on iOS 14

Here’s how to Turn Off Silence Calls in iOS 14 on iPhone

March 2, 2021
silence

How to Silence Calls from a Specific Contact on your iPhone

March 2, 2021

Can My Mac Get Viruses and How to Protect It?

February 17, 2021
discord featured image

Here’s how to Change your Age on Discord

February 14, 2021

TRENDING

  • facebook messenger logo

    How to Send Files and Documents on Messenger for Android

  • How to Reply to a Specific Message on Instagram 2020

  • How to Sign Out of One Google Account on your Computer

  • What does Other Viewers mean on a Facebook Story?

  • How to View your Archived Stories on Facebook 2020

ADVERTISEMENT

Popular Tags

Google Android Chrome

Twitter Dark Mode OnePlus

iPhone Apple Apps Mac

Facebook Messenger Security

Instagram Tutorials Photos

  • About
  • Advertise
  • Contact
  • Privacy Policy

© 2021 WebTrickz. All Rights Reserved.

No Result
View All Result
  • News
  • Reviews
  • Apps
  • How To’s
  • Android
  • Google
  • iPhone
  • Mac
  • Contact Us

© 2021 WebTrickz. All Rights Reserved.