[wp-trac] [WordPress Trac] #37687: Multisite - Enormous number of update queries during site creation (user roles)

WordPress Trac noreply at wordpress.org
Thu Jul 24 17:08:13 UTC 2025


#37687: Multisite - Enormous number of update queries during site creation (user
roles)
-------------------------------------------------+-------------------------
 Reporter:  fliespl                              |       Owner:  realloc
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.9
Component:  Networks and Sites                   |     Version:  2.0
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-test-   |     Focuses:  multisite,
  info dev-feedback                              |  performance
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 > What tests do you expect?

 In this case, I think testing that `add_role()` and `$role->add_cap()`
 result in an identical end result when `use_db` is either `true` or
 `false` is sufficient; no need to test the upgrade routine specifically.

 Set it to `true`, add everything, get the roles, delete them.
 Set it to `false`, add everything, get the roles, compare them.

 What do you think?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37687#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list