Ultimate Member stores user data primarily in WordPress’s built-in wp_users
and wp_usermeta
tables, with some additional metadata in its own custom tables when needed. Understanding how this data is structured is crucial if you want to query, export, or debug it.
Database Tables Used by Ultimate Member
Ultimate Member does not create its own custom database tables. It stores user data in the default WordPress tables:
wp_users
– Stores core user data like username, email, password, and display name.wp_usermeta
– Stores custom profile fields, roles, and plugin-specific settings.um_metadata
– (optional) Only created when “Enable custom table for usermeta” is enabled.
This means Ultimate Member integrates natively with WordPress and remains compatible with most other plugins that rely on the standard user system.
Table Relationships
wp_usermeta.user_id
links to wp_users.ID
. Every custom field you create in Ultimate Member becomes a meta_key
in wp_usermeta
.
Understand the wp_usermeta Table Structure
The wp_usermeta
table has four main columns:
umeta_id
: A unique ID for each row.user_id
: The ID of the user the data belongs to. This links back to thewp_users
table.meta_key
: The name of the data field (this is the “meta key” you are looking for).meta_value
: The actual data saved for that user and field.
How to Find Ultimate Member User Data in phpMyAdmin
You can manually access the user meta keys stored by the Ultimate Member plugin by directly accessing your WordPress database. The most common tool for this is phpMyAdmin, which is available in most web hosting control panels.
Access Your Database
- Log in to your website’s hosting control panel (like cPanel or Plesk).
- Find and open phpMyAdmin.
Select Your WordPress Database
- On the left-hand side of phpMyAdmin, you will see a list of databases. Click on the one that corresponds to your WordPress installation.
- If you are not sure which database is the correct one, you can find its name in your site’s
wp-config.php
file, defined in the linedefine( 'DB_NAME', 'your_database_name' );
Locate the wp_usermeta Table
- Once you have selected the database, a list of tables will appear. Scroll down and click on the
wp_usermeta
table. - Your table prefix might be different from the default
wp_
. For example, it could bewp_xyz_usermeta
Find Data for a Specific User
- To see all the custom data for a single user, you first need their
user_id
. You can find this in thewp_users
table or by navigating to the user’s profile in the WordPress admin dashboard and looking at the URL in your browser. - In the
wp_usermeta
table, use the Filter or Search function to find all rows where theuser_id
matches the user you are investigating. This will show you every piece of metadata associated with them.

View & Edit User Fields Data using WP User Data




WP User Data is a comprehensive WordPress plugin that provides administrators with advanced user management capabilities. It offers a powerful interface to view, filter, search, and export user data across your WordPress site with sophisticated filtering options.
- Go to WordPress Dashboard > WP User Data > Users
- Click on any user
- Click on “User Fields” tabs
How to Get Ultimate Member User Data with PHP
Using get_user_meta()
You can use WordPress’ built-in function get_user_meta() to retrieve the meta value or profile fields data.
$user_id = 123; // Replace with dynamic user ID
$phone = get_user_meta( $user_id, 'phone_number', true );
echo 'Phone: ' . esc_html( $phone );
In get_user_meta
, true
ensures it returns a single value (string) rather than an array.
Using um_fetch_user() and um_user()
Ultimate Member uses the native WordPress user system, meaning the UM User ID is the same as the WordPress User ID. You don’t need to look for a separate “UM ID” in the database.
Here’s how you can fetch Ultimate Member user data for a given WordPress user:
Get the WordPress User ID
You can retrieve a user ID in multiple ways. For example, if you are inside a loop or have a specific user:
$user_id = 4; // Replace with dynamic user ID
Fetch the Ultimate Member User Profile
Use um_fetch_user() with the WordPress user ID:
um_fetch_user( $user_id );
Get Any Ultimate Member Field
Now you can retrieve any custom field or profile data stored by Ultimate Member:
$field_data = um_user( 'band' ); // Replace 'band' with your field key
echo $field_data;
Looping Through All Users
If you want to fetch data for all users, you can loop through WordPress users and fetch UM data for each one. This snippet retrieves all meta keys and values for a specific user. It is useful for discovering which keys Ultimate Member (or other plugins) are using
$users = get_users();
foreach ( $users as $user ) {
um_fetch_user( $user->ID );
echo 'Username: ' . um_user( 'user_login' ) . '<br>';
echo 'Band: ' . um_user( 'band' ) . '<br><br>';
}
How to Get All User Meta Keys (List of Custom Fields)
Sometimes you need to see what custom fields (meta keys) exist for a user. Here’s how:
<?php
global $wpdb;
$keys = $wpdb->get_col( "SELECT DISTINCT meta_key FROM $wpdb->usermeta" );
print_r( $keys );
Retrieve Form Data Using WP_User_Query
You can use WordPress function get_user_meta()
to retrieve the field value. The Ultimate Member function um_user( $data )
may be useful in some cases.
Get All Users with Role “member”
If you want to fetch all users with a specific role (like Ultimate Member’s member role):
<?php
$args = array(
'role' => 'member', // Replace with your target role
'orderby' => 'ID',
'order' => 'ASC',
);
$users = get_users( $args );
// Loop through users
foreach ( $users as $user ) {
echo 'User ID: ' . $user->ID . ' | Username: ' . $user->user_login . '<br>';
}
Retrieve a list of users who registered after 1 January 2023
<?php
$args = array(
'date_query' => array(
array(
'after' => 'January 1, 2023',
),
),
);
$user_query = new WP_User_Query( $args );
$users = $user_query->get_results();
foreach ( $users as $user ) {
echo 'Username: ' . $user->user_login . '<br />';
echo 'User email: ' . $user->user_email . '<br />';
echo 'User registered: ' . $user->user_registered . '<br />';
}
This code will create a new instance of the WP_User_Query class, passing the $args array as an argument. The date_query argument is used to retrieve only users who have registered after 1 January 2023. The code then loops through the results and displays the username, email, and registration date of each user.
Retrieve a list of users who registered after 1 January 2023
<?php
$args = array(
'meta_query' => array(
array(
'key' => 'country',
'value' => '',
'compare' => '!=',
),
),
);
$user_query = new WP_User_Query( $args );
$users = $user_query->get_results();
foreach ( $users as $user ) {
echo 'Username: ' . $user->user_login . '<br />';
echo 'User email: ' . $user->user_email . '<br />';
echo 'Country: ' . get_user_meta( $user->ID, 'country', true ) . '<br />';
}
This code will create a new instance of the WP_User_Query class, passing the $args array as an argument. The meta_query argument is used to retrieve only users who have a non-empty value for the country field. The code then loops through the results and displays the username, email, and country of each user.
Retrieve Form Data Using SQL Query
Retrieve a list of users who registered after 1 January 2023
You can retrieve a list of all users who registered after 1 January 2023 by using the following SQL query:
This query selects all columns from the wp_users table and returns only those records where the user_registered field is greater than or equal to ‘2023-01-01 00:00:00‘. The result will be a list of all users who registered after 1 January 2023.
Note: You’ll need to replace wp_ with the actual prefix of your WordPress database tables, if it’s different.
This code uses the $wpdb->prepare method to safely format the SQL query and avoid SQL injection attacks. The %s placeholder is used to represent the ‘2023-01-01 00:00:00‘ argument, which is passed as the second argument to the prepare method. The $wpdb->get_results method is then used to execute the query and retrieve the results.
Note: You’ll need to replace {$wpdb->users} with the actual name of the wp_users table, if it’s different.
<?php
$getUsers = $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM {$wpdb->users}
WHERE user_registered >= %s",
'2023-01-01 00:00:00'
), ARRAY_A
);
foreach($getUsers as $getUser){
print_r($getUser);
}
Here we are using * which feteches all the data (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) from that table. If you only want the display name, then you can use display_name instead of *
Retrieve a list of users who have filled in the Country Field
This query selects all columns from the wp_users table and joins the wp_usermeta table, where user metadata is stored, on the ID field. The query returns only those records where the meta_key is ‘country‘ and the meta_value is not empty. The result will be a list of users who have filled in the country field, along with their country.
Note: You’ll need to replace wp_ with the actual prefix of your WordPress database tables, if it’s different, and replace ‘country‘ with the actual name of the meta key that the Ultimate Member plugin uses to store the country field, if it’s different.
<?php
$getUsers = $wpdb->get_results(
$wpdb->prepare(
"SELECT wp_users.display_name, wp_usermeta.meta_value
AS country
FROM wp_users
JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id
WHERE wp_usermeta.meta_key = 'country'
AND wp_usermeta.meta_value != ''"
), ARRAY_A
);
foreach($getUsers as $getUser){
print_r($getUser);
}
Export/ Import Profile Data
Exporting and importing user data for the Ultimate Member plugin involves a multi-step process, primarily because the plugin does not have a native import/export feature. You will need to use other tools to move the user data, which is stored across standard WordPress database tables. Consider using one of the following plugins:
1. WordPress Users Import and Export
3. Import and export users and customers
Use these plugins only for exporting or importing data fields. The above plugins are not built for transferring members from one site to another.
Exporting User Data with WP All Export
The WP All Export plugin is frequently recommended for this task because it can access and export custom user metadata, which is where all of Ultimate Member’s unique profile fields are stored.
Steps to Export:
- Install and activate the WP All Export plugin on the source website.
- In the WordPress dashboard, navigate to All Export > New Export.
- Select Specific Post Type and choose Users from the dropdown menu.
- You will be taken to a drag-and-drop interface. All standard user data (like username and email) will be available. To include Ultimate Member data, find the section for Custom Fields or User Meta.
- Identify and add the meta keys that correspond to your Ultimate Member fields (e.g.,
first_name
,job_title
,profile_photo
). - Once you have added all the desired fields, proceed to the next step and run the export.
- Download the exported file, which will typically be in a CSV format.
Importing User Data with WP All Import
The WP All Import plugin is the counterpart to WP All Export and is designed to map and import complex data into WordPress.
Steps to Import:
- Install and activate the WP All Import plugin on the destination website.
- Navigate to All Import > New Import and upload the CSV file you exported earlier.
- Select New Items and choose to create Users.
- You will see an interface where you can drag the data from your CSV file on the right to the corresponding user fields on the left.
- Map the basic user information like email, username, and password.
- Crucially, find the Custom Fields section. For each Ultimate Member field, you must manually create a new field and provide the Name (which is the meta key, e.g.,
job_title
) and then drag the corresponding value from your CSV file into the Value box. - Once all fields are mapped correctly, run the import process. The plugin will create the users and populate their profile information, including all the custom data for Ultimate Member.
Frequently Asked Questions (FAQ)
If I delete Ultimate Member, will my users be deleted?
No. The user accounts will remain in the wp_users
and wp_usermeta
tables. However, you will lose the plugin-specific features like custom roles, profile layouts, and access restrictions.
Does Ultimate Member create its own database tables?
While the plugin may create some tables for its own settings or logging, all core user profiles and custom field data are stored in the standard wp_users and wp_usermeta tables.
How are Ultimate Member roles stored?
User roles assigned by the plugin are typically stored in the wp_usermeta
table with a meta key like wp_capabilities