How To Display Users Registration Date in the User List Table on WordPress Dashboard

When you have a membership WordPress website or a WooCommerce online store with thousands of customers, you need to analyze the customer information. The registered date of the website user is important data you need to know. However, WordPress’s default user list table doesn’t display the user’s registration date, see the screenshot of the user list table below.

We need to add a column to the header of the list table, to display the users’ registration date.

In this article, we will introduce how to add a registration date column to the header of the user list table by creating a plugin. The target of the plugin is to add a new column named ‘Registration date’ to the right side of the posts column. Let’s dive into the steps.

Steps to Add the Registration Date Column

We will create a simple plugin that does the following:

    • Add a new “Registered Date” column to the Users table.
    • Populate that column with the registration date of each user.
    • Make the column sortable so you can sort users based on when they registered.

Step 1: Create the Plugin folder and file

We’ll start by creating a simple WordPress plugin that adds a new column name ‘Registration date’ to the user list table.

    • Create the Plugin Folder
      Create a new folder called user-registration-date on your PC.
    • Create the Plugin File
      In the user-registration-date folder, create a PHP file named user-registration-date.php. This will contain the code for your plugin.

Step 2: Add the below Plugin Code to user-registration-date.php 

				
					<?php
/*
Plugin Name: User Registration Date Column
Plugin URI: https://wpcollege.com/
Description: Adds a "Registered Date" column to the Users list table in the WordPress dashboard, showing the date each user registered.
Version: 1.0
Author: WPCOLLEGE
Author URI: https://wpcollege.com/
License: GPLv2 or later
*/

// 1. Add a new column to the Users List Table
function urd_add_user_register_column($columns) {
    $columns['user_registered'] = __('Registered Date');
    return $columns;
}
add_filter('manage_users_columns', 'urd_add_user_register_column');

// 2. Populate the new column with the user registration date
function urd_show_user_register_column($value, $column_name, $user_id) {
    if ('user_registered' == $column_name) {
        $user = get_userdata($user_id);
        $registered = $user->user_registered;
        // Format the date or display as is
        $value = date_i18n('Y/m/d', strtotime($registered));
    }
    return $value;
}
add_filter('manage_users_custom_column', 'urd_show_user_register_column', 10, 3);

// 3. Make the "Registered Date" column sortable
function urd_user_register_column_sortable($columns) {
    $columns['user_registered'] = 'user_registered';
    return $columns;
}
add_filter('manage_users_sortable_columns', 'urd_user_register_column_sortable');

// 4. Ensure the sorting works when clicking the "Registered Date" column header
function urd_user_register_column_orderby($query) {
    if (!is_admin()) {
        return;
    }
    $orderby = $query->get('orderby');
    if ('user_registered' == $orderby) {
        $query->set('orderby', 'registered');
    }
}
add_action('pre_get_users', 'urd_user_register_column_orderby');

				
			

Step 3. Save and Activate the Plugin

  • Save the file and zip the user-registration-date folder.
  • Go to your WordPress dashboard, then navigate to Plugins > Add New.
  • Click the Upload Plugin button and upload the zipped folder.
  • Once uploaded, click Activate to enable the plugin.

Step 4: Test The Plugin

After activating the plugin, go to your WordPress dashboard:

  1. Navigate to Users > All Users.
  2. You will now see a new column labeled Registered Date next to other user information.
  3. The column will display the registration date of each user in the format YYYY/MM/DD.
  4. You can click the Registered Date column header to sort the users by the date they registered.

Conclusion

By adding a custom plugin like this, you can easily track when users registered on your WordPress site directly from the dashboard. This can be useful for membership sites, subscription-based platforms, or any WordPress site that manages user accounts.

Scroll to Top