How to export WordPress users with custom fields and meta

WordPress is a great tool for managing content and custom data. And although the default WordPress user management and exporting tools only provide some basic options, WordPress has such a great ecosystem that we can use additional plugins to tailor it to our needs. Today we are going to learn how you can use Users Insights to export exactly the data that you need for your WordPress users. We are also going to see some great uses of the export tool with some external data manipulation tools.

wordpress export users with custom fields

Today’s goals

Exporting your user data is really useful as you can learn not just quantitative data about your users (how many they are, how many are from X or Y places) but also qualitative data since all the custom fields for each user will be kept in your exported data set.

Our goal today is to cover aspects such as:

  • What are custom fields
  • How Users Insights can read your custom fields data
  • How to export your WordPress user meta data with Users Insights
  • How to export your user data stored with Gravity forms
  • How to export your WooCommerce customer data
  • How to export your Ultimate Member user data
  • How to export your bbPress / support system user data
  • How to export your BuddyPress users with their custom fields

So, let’s get started!

What are WordPress custom fields

A custom field in WordPress is a piece of information that you can add to a post or page. This information is called metadata and can be anything from a simple text field to a more complex field like a piece of code that does some functionality. Custom fields are powerful tool and can be used by developer and end users to store data that you can display on your website. For example, you could use a custom field to store the price of an item, the color of an item, or the size of an item.

You may be familiar with the concept of custom fields for a post, page or custom post type. In order to better understand the concept of custom fields for users, we can look at posts or custom post types in WordPress. If you have a product in your WordPress site (using a plugin such as WooCommerce) the data associated with it, such as the price, dimensions and tax class, are all stored in custom fields. This is a great way to set this data in specific apart from your other data, in this way you can manipulate your custom data to show a price for your customers, or use the correct weight when calculating the shipping price.

Chances are that you already have a lot of custom fields in place, as most plugins use them to store important user information.

Like we’ve mentioned before custom fields are a powerful tool to add information to each of your users in a way that you can extract and manipulate this data afterward. Custom fields are important part of the WordPress ecosystem and are used and created by a lot of WordPress plugins and tools such as the Advanced Custom Fields plugin, memberships plugins or even contact form plugins.

This is all part of the magic of how you can turn raw data into useful information.

Why use custom fields in wordpress

You may think that this is a very obscure WordPress feature that you aren’t using at all, but chances are that you already have a lot of custom fields in place, as most plugins use them to store important user information. So you have all these hidden gems about your users ready to be used!

By default, WordPress already stores your user email, role, first name, last name, website and other fields. However plugins such as WooCommerce, bbPress, LearnDash, Gravity Forms and others add a lot of data on top of it, even if you can’t see it.

Additionally, if you want to create a new custom field yourself you can read the WordPress guide on how the user meta works, and you can use this in your own plugin or theme.

And now comes a big part of the magic, let’s understand how Users Insights can see it.

Where are WordPress custom fields stored?

WordPress stores custom fields in the database. When you create a custom field, it is added to the database and then displayed on the front-end of your website by a plugin, theme or custom code.

How Users Insights can read your custom fields data

Users Insights won’t read all of your user meta fields right off the bat for performance reasons.It will only load the custom fields that the activated building modules of Users Insights provides out of the box. However there is a way to get all user custom fields data from wordpress loaded into Users Insights. In order to enable these fields and use them in your filters or columns you need to explicitly set them under WordPress Dashboard > Users Insights > Custom Fields.

 

The “Field Name” is what you’ll see in the Users Insights table and filters. This is also used in your CSV export file. You can add any name you want for your fields as it is purely used for Users Insights display and doesn’t have any relation with other plugins. In this way you can add something that is as close as possible to the actual function that field has for you, so it’s easy to remember what data is associated with it when you are scanning through your columns or filters.

The “Field Key” on the other hand has to be exactly the same as the user meta key in your WordPress database. If you are adding a new field that is managed by another WordPress plugin, you need to use the exact same field key. This usually can be double checked in the plugin’s docs.

After you’ve mapped the fields for the Users Insights plugin you still can freely edit these fields in the future. For that, you can use the edit icon:

export wordpress custom field

 

You may be asking yourself now, the field keys are pretty important, what if I don’t know them for my site? If that’s your case you can use our free plugin Extended CRM for Users Insights. This plugin allows you to see a list of all meta keys when you are mapping your fields, making it much easier and removing all the guesswork if you are using other plugins.

This also allows you to discover yet new data about your users that you may not even know you were storing. Here is an example:

 

How to export your WordPress user meta with Users Insights

Once you have registered your user meta fields as Users Insights Custom Fields, these fields will be automatically available in the Users Insights table and filters. This means that you will be able to view the stored user meta data, as well as filter the user list by the custom fields values. Very importantly though, is that you can now export users with meta data easily with one click.

Export users

To learn more about using WordPress user meta in Users Insights, check out our How to display, search and filter your WordPress user meta article.

 

How to export your user data stored with Gravity forms

If you are using a plugin such as Gravity forms, it’s possible to take the user data collection to a next level with a fully automated system that will turn the form fields into user meta once the users complete your forms. One way to achieve this is by using the Gravity Forms User Registration Add-on. This add-on provides an interface that allows you to map the data, submitted through Gravity Forms to user meta data. In this way, you can use Gravity Forms to create custom registration fields or custom profile pages and all of the submitted data will be stored as user meta.

The Gravity forms integration module for Users Insights

The Users Insights plugin has out of the box support for Gravity Forms and its User Registration Add-on. You can enable the Gravity Forms module under WordPress Dashboard > Modules > Gravity Forms.

This module comes in handy as it automatically detects the user fields from the User Registration Add-on and formats their data. Gravity forms (and most plugins) may store your custom data in a certain way (serialized) that you can’t just directly read it, so our module will process this and automatically output the data in a readable format. Users Insights also detects the field in their correct type, so dates will be formatted correctly and can be used in filters as you would with other calendar-based fields.

Reading and Exporting your data

So once you activate your module you are all set for using the fields automatically when filtering your users, ordering your columns or even in your export options.

For example, you may use Gravity Forms to store some additional information about your users, such as their age and education. Depending on how you add this data you can even export a list of all users along with their custom fields.

Gravity Forms Export User Data

This will generate a CSV file with all your desired data.

 

How to export your WooCommerce customer data

WooCommerce stores some of the user data that you could map and use when filtering or exporting. To help you check all the possible fields you can again use the Extended CRM for Users Insights plugin. For example, WooCommerce already stores the “billing_country” and “billing_city” that you can use on top of the Geo-Location data for even more detailed reports (for example customers that buy from one city / country and send to another).

It is also beneficial to communicate with your customers through different channels when you have a lot of them registered on your WooCommerce site. For example, you can have a newsletter option in your WooCommerce user registration form but maybe you don’t even know which users have signed up, or don’t have a mailing software connected to your site.

Or maybe you want to export all users who bought the product X or Y. Or even maybe you want to target the customers that have repeated purchases. Filtering your WordPress users’ purchase history can be accomplished with the Users Insights WooCommerce Module. This module provides options to filter the user list based on their shopping activity, such as purchased products, WooCommerce orders, lifetime value or number of orders.

woocommerce export prodcut data

You just need to select your desired filters in Users Insights and then you will get a CSV file with all the currently selected columns. If you want more details we have a detailed guide on how to export  your WooCommerce customers data.

It is important to mention that there are separate modules for WooCommerce subscriptions and WooCommerce Memberships so that you can export users data and WooCommerce customers data that is specific to these plugins as well.

 

How to export your Ultimate Member user data

The Ultimate Member plugin turns your regular site into a social platform. And with this comes a lot of relevant data about your users that you may want to know about.

The Users Insights plugin also includes a dedicated Ultimate Member module that can be used to list, search and filter your Ultimate Member profile data. You can activate it as you do with the other modules, by checking the WordPress Dashboard > Users Insights > Module Options and activate the Ultimate Member one.

Then you’ll see a whole new set of filters and columns available when filtering your users with Users Insights:

All of these again can be exported with the export button. Also, it’s worth mentioning that you can not only export the current Ultimate Member users and the data associated with them, just make sure the columns you want to have in your CSV file are visible.

 

How to export your bbPress / support system user data

When it comes to creating support forums (or forums in general) bbPress is a great option. This plugin allows you to turn your regular WordPress install into a fully customizable forums system.

But again when it comes to information about your user activity and data we don’t know much by just looking at WordPress or bbPress. To make it better you can just enable the bbPress module for Users Insights and use all these fields in your filters and columns.

Once the module is activated, you’ll have a lot more options when filtering your users, ordering columns or exporting WordPress users and their data.

With this option you can, for example, provide your most active users other solutions (for example for exclusive customization services or a private beta). You can also export your users to analyze their individual cost by using a spreadsheet software, such as Excel. You can even go as far as comparing the user support requests to their lifetime value (provided in WooCommerce).

Here is a quick glance on how the filters will look like when you have your users ordered and filtered by the number of replies created (and therefore they probably are consuming more support resources).

 

How to export your BuddyPress users with their custom fields

With more than 200,000 active installs BuddyPress is certainly one of the most popular choices when it comes to creating a social network. And as Facebook knows very well the true value of a social network is on your user data.

In order to make sense out of your visitors’ data, you can use our BuddyPress module and all your user fields will be already mapped and nicely formatted, ready to be used in filtering options, columns, ordering and data export. Activating it is easy, as you would expect at this point. You can find the BuddyPress module under WordPress Dashboard > Users Insights > Module Options.

Once the module is activated, your xProfile fields (user profile fields used in BuddyPress) will be automatically detected on the Users Insights table. You can learn a little bit more about these in our BuddyPress Module page.

Now if you open the filtering options you’ll see the BuddyPress user fields ready to be used. This data can be used in creative ways, in combination with other plugins to discover really interesting things about your users. For example, you could try to find relations between the user activity, their age and their number of orders.

Export BuddyPress User Data

You can freely explore now, not only using the Users Insights filtering options but other softwares as well as you could just export your users and the data associated with them.

Conclusion

Now we know a lot more about the custom user fields, how to create custom fields, how to map them all effortlessly with the different modules included in Users Insights and how to export all this data for further manipulation. This not only that be useful if you want to move your WordPress site to a new host or platform, or if you want to migrate your users to a new system. But also this will allow you to import users and user data from a WordPress site into different tools and softwares.

With all these tips you’ll know more about your users in general and ultimately you’ll also learn much more about your business. After all, good data and good information are vital for the decision making process.

We hope you enjoyed it, stay tuned for more articles!