Exporting Comment Emails From WordPress

Michael KeatingWordpress Tips1 Comment

Exporting Wordpress Comments With phpMyAdmin

As previously mentioned, I recently redesigned this website to be more modern. In doing so, I had some fun, learned some new tricks and made one or two minor mistakes. All in a days work of course and that is what I love about being an Internet marketer.

Now that I got my site squared away, I am ready to do a refresh of my branding and marketing efforts. This includes beefing up my email marketing subscriber list because to be honest, I ignored it for the past year (tisk, tisk, I know). In the past, all of the email addresses in my subscriber list came via the various sign up forms on my websites. I was doing fairly well getting a handful of sign ups a week. But with this new initiative, I wanted to find a way to add more subscribers to my list.

Rather than scrape a bunch of emails, I realized that I had hundreds of people who graciously left comments on my blog posts. Most of these individuals left their email address (and name), which I could easily add to my MailChimp list. Now did these people actually “opt-in”? In my mind they did and that is all that matters to me. There may be some people who disagree and that’s cool too. For the risk takers out there, let me tell you how I was able to export the email addresses of the people who left comments on my blog posts.

Exploring WordPress Plugins

My initial thought was, “there has to be a plugin that can accomplish this very easily”. I tested out Commenter Emails and wasn’t very satisfied with the outcome. Now when I say that, it isn’t a slight in the plugin. I’m sure it is great, but I just gave up before I figured it out. Another option which I just found now was Email Commenters by Yoast. His other plugins are great so I’m assuming this one will work as well.

Now let’s assume neither of these plugins worked for you and you are searching for another option. That is where this post will come in handy!

Locating WordPress Comments in phpMyAdmin

Before you even get started with any of the recommendations in this post, make sure you have your website backed up properly (standard procedure). Also, having a developer close by never hurt anybody!

So for whatever reason, all of your WordPress comments are no longer in your WordPress admin. Maybe you added a plugin and it wiped them. Maybe you just accidentally deleted them. Regardless, we need to locate and export them from phpMyAdmin.

Logging Into myPhpAdmin

In most cases, you will need to go through your hosting provider to find the right myPhpAdmin login URL. Once you find your login URL it should look something like the following screenshot:

phpMyAdmin login screen example

Once you enter your username and password, hit that beautiful little grey “go” button. This should log you into where you are able to manage your MySQL database and locate your WordPress comments.

Finding the Right Database

If you are anything like me you will have multiple databases. You need to make sure that you select the right database for the domain you are trying to export email addresses from. You should see a list of the databases within your myPhpAdmin like this:

Multiple Databases in MyPhpAdmin

Once you select the right database, it is now time to find the table where the WordPress comments are stored.

Finding MySQL Table with WordPress Comments

After clicking the right database, you will see a list that contains all of the tables associated with your specific database. These tables are located in the same spot as the database names, which is down the left hand side. You want to locate “wp_comments” like below:

wp_comments In MySQL Table

Select the “wp_comments” table and in the larger section on the right of your browser you should see all of the comments that have been left on your WordPress posts. You will also see any replies that were left by you or other WordPress users.

It should look something like this:

Wordpress comments in mySQL

Exporting Comments and Email Addresses from MySQL

After you are confident you are in the right database and found the right table, it is time to export your comments (and email addresses). Along the top, you will see a menu of options and one of them says “Export”.

export comments from mysql

Click the export option and you will be taken to another screen. I’m not an expert so I am not going to even attempt to select option for “custom – display all options”. To play it safe, go with the “Quick – display minimal options”. Then decide next, you need to decide on the file format you would like to export. For the sake of this exercise, I prefer to work with a csv. Your screen should look as follows:

export format for comments in mysql

Select that beautiful grey “Go” button and your download should start automatically.

Gathering Email Addresses From Comments Export

Locate the downloaded file and open it in your preferred csv viewer. Most likely the file will open in Excel automatically, but if it doesn’t, be sure to use a comparable solution like Google Drive.

The file should be very easy to understand since it is broken up into rows and columns. The email addresses should stand out so go ahead and do what you need to from this point. I deleted all columns except the one that contained the email addresses. I then removed all duplicates and uploaded the email addresses into my MailChimp account.

About the Author

Michael Keating

Twitter Google+

Mike is a prolific digital marketing strategist, entrepreneur and SEO specialist who understands how to drive results using integrated digital strategies. He is one of the founders of Octatools and is excited about the opportunity to help DIY SEOs and business owners get results online.

One Comment on “Exporting Comment Emails From WordPress”

Leave a Reply

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