Make WordPress Core

Opened 19 months ago

Last modified 4 months ago

#24922 new enhancement

Please do not hardcode network upgrade to 5 sites at a time.

Reported by: _ck_ Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 3.6
Component: Upgrade/Install Keywords:
Focuses: multisite Cc:


Upgrading hundreds of thousands of sites via network upgrade is a process of insanity with browser based 5-at-a-time limit.

Please put a filter on it and/or allow it to be set via get_options.

Hardcoded "5" can be found in /wp-admin/network/upgrade.php

CLI tool for upgrading would be even better - I guess I can extract the code from that script to make it CLI based at high speed.

Also, why does the query for the upgrade use

$wpdb->get_results("SELECT * FROM (note the select wildcard)

when only $details['blog_id'] is used in the script afterwards?

You could fetch thousands of integers at a time if you didn't use a wildcard to wastefully grab and return all columns.

Use instead

$wpdb->get_col("SELECT blog_id FROM

Change History (5)

comment:1 @channeleaton19 months ago

  • Cc channeleaton added

Isn't it set to 5 to keep PHP from timing out?

As far as a CLI tool, not everyone has SSH access, thus making it less useful for many users. It may be better to release something like that as a wp-cli extension.

comment:2 @jeremyfelt13 months ago

  • Component changed from Network Admin to Upgrade/Install

comment:3 @cfoellmann13 months ago

I am all for making the hardcoded value "5" modifiable via a filter. Why not?

comment:4 @jeremyfelt5 months ago

  • Milestone changed from Awaiting Review to Future Release

We should consider this ticket as part of any UI work done around core updates. Definitely room for a filter if things do not get a full revisit via JS.

5 is pretty sad sometimes and I've done horrible things to make it 10. :)

comment:5 @jeremyfelt4 months ago

I created #30097 to track the second part of this report separately, as it can be fixed without adding a filter.

Note: See TracTickets for help on using tickets.