Make WordPress Core

Opened 2 years ago

Last modified 8 weeks ago

#24922 new enhancement

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

Reported by: _ck_ Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.6
Component: Upgrade/Install Keywords: close
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

Attachments (1)

24922.diff (1.9 KB) - added by kuliraj 5 months ago.
Filter added

Download all attachments as: .zip

Change History (9)

#1 @channeleaton
2 years 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.

#2 @jeremyfelt
22 months ago

  • Component changed from Network Admin to Upgrade/Install

#3 @cfoellmann
22 months ago

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

#4 @jeremyfelt
14 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. :)

#5 @jeremyfelt
13 months ago

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

#6 @jeremyfelt
7 months ago

Related (maybe duplicate) #11869. See also #18292.

5 months ago

Filter added

#7 @kuliraj
5 months ago

The uploaded patch runs the number of sites that are upgraded at once through the filter called "ms_upgrade_sites".

#8 @jeremyfelt
8 weeks ago

  • Keywords close added
  • Milestone changed from Future Release to Awaiting Review

Suggesting that we close this as a wontfix.

I like the idea of having a filter so that more than 5 sites can be upgraded at once. I like the idea of #11869 better, which would remove the need for the filter by processing those updates via Ajax on one screen.

Note: See TracTickets for help on using tickets.