Opened 5 years ago
Closed 5 years ago
#44593 closed enhancement (invalid)
get_sites() : Limitation of 100 websites ?
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | |
Focuses: | Cc: |
Description
Hello,
In the documentation (https://developer.wordpress.org/reference/functions/get_sites/), we can see that the maximum number of sites to be retrieved is by default set to 100.
Why this limitation ?
Can we set by default all websites ?
Thanks !
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi @onpc, thanks for this ticket and welcome to Trac!
Some multisite instances have many thousands (if not millions!) of sites. Querying every site on those installs will crash. Querying the entirety of any data set all at once does not scale and is not considered good practice.
100 is a sensible limit that was chosen as the default. If you have performance data that suggests that limit is too low (or high), this ticket can be reopened and the default number can be reevaluated. But retrieving all sites at once is not an option.