WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 10 months ago

#24922 closed enhancement (wontfix)

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

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

Description

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 15 months ago.
Filter added

Download all attachments as: .zip

Change History (10)

#1 @channeleaton
3 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
3 years ago

  • Component changed from Network Admin to Upgrade/Install

#3 @cfoellmann
3 years ago

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

#4 @jeremyfelt
2 years 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
2 years ago

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

#6 @jeremyfelt
17 months ago

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

@kuliraj
15 months ago

Filter added

#7 @kuliraj
15 months ago

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

#8 @jeremyfelt
12 months 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.

#9 @swissspidy
10 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing in favour of #11869

Note: See TracTickets for help on using tickets.