[wp-trac] [WordPress Trac] #63538: User deletion screen becomes unresponsive on sites with large user bases (suggest Select2/AJAX enhancement)

WordPress Trac noreply at wordpress.org
Thu Jun 5 21:04:14 UTC 2025


#63538: User deletion screen becomes unresponsive on sites with large user bases
(suggest Select2/AJAX enhancement)
-------------------------------------------------+-------------------------
 Reporter:  odirlon                              |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Users                                |    Version:  6.8
 Severity:  critical                             |   Keywords:
  Focuses:  ui, accessibility, javascript,       |
  administration, coding-standards               |
-------------------------------------------------+-------------------------
 When attempting to delete a user on a WordPress installation with a large
 number of users (e.g., WooCommerce stores with tens or hundreds of
 thousands of accounts), the user deletion screen (/wp-
 admin/users.php?action=delete) becomes extremely slow or completely
 unresponsive.


 == **Problem**
 The bottleneck appears during the rendering of the <select> element used
 to choose a reassignment target for the posts of the user being deleted.
 WordPress loads the full user list into this dropdown server-side,
 resulting in heavy memory usage and slow page loads — sometimes leading to
 timeout or browser crash.

 This step is currently mandatory. Skipping it is not possible via the UI
 or core behavior.

 **Steps to reproduce**
 Install WordPress with WooCommerce (or any plugin generating many user
 accounts).

 Programmatically insert 50,000+ users.

 Go to Users > Select a user to delete.

 Click “Delete”.

 Observe the browser freezing on the user deletion confirmation screen.

 **Expected behavior**
 The confirmation screen should remain responsive regardless of the number
 of users in the database. Ideally, the reassignment field should support
 scalable lookups.

 **Proposed solution**
 Enhance the reassignment dropdown field to use Select2 with AJAX support,
 similar to how users are selected in other parts of the admin (e.g.,
 wp_dropdown_users() fallback replacement with AJAX-backed search).

 **Additional context**
 Tested on WP 6.5.4 and trunk.

 Same behavior occurs with all plugins disabled and using the default
 Twenty Twenty-Four theme.

 Environment: Ubuntu 22.04, PHP 8.1, MySQL 8.0, Chrome 125.

 A scalable user search UI in this scenario would avoid rendering thousands
 of <option> elements and improve UX significantly for administrators
 managing large sites.

 Let me know if a patch or enhancement proposal would be welcomed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63538>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list