Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#17760 closed defect (bug) (fixed)

Allow partial builds to be even smaller

Reported by: nacin Owned by: nacin
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: General Keywords: 2nd-opinion
Focuses: Cc:


Currently, wp-admin/includes/update-core.php requires three other files to also exist in the package: wp-settings.php, wp-admin/admin.php, and wp-includes/functions.php.

While these files are critical, WordPress will fall on its head if any major file is missing.

wp-includes/functions.php is pretty large, at 4556 lines, but even in a partial build where that file isn't chnaged, we need to include it.

By replacing wp-includes/functions.php with version.php and readme.html a partial build from 3.1.1 to 3.1.2 dropped from 115 KB to 78 KB.

While md5 will be on the table in v2 (and thus we can remove these checks), let's change update-core.php to validate the package via some smaller files and files that are always there.

At a minimum, that means wp-includes/version.php and readme.html. We can leave in wp-settings.php and wp-admin/admin.php without much overhead.

Attachments (2)

17760.diff (718 bytes) - added by nacin 4 years ago.
17760.2.diff (641 bytes) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @nacin
4 years ago

Skipping wp-settings.php and wp-admin/admin.php shaves an extra 8 KB off the zip, down to 70 KB.

4 years ago


4 years ago


#2 @dd32
4 years ago

Those files would've simply been chosen as they're files which are required, them being present says that it's a full and valid zip. Changing to version.php and readme.html makes sense, they're going to change with partial builds, given we trust WordPres.org zip's to be valid, we don't really need to use the previous file checks.

#3 @nacin
4 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [18262]:

Make update-core only do sanity checks against readme.html and version.php, both always included even in partial builds. fixes #17760.

#4 @nacin
4 years ago

  • Milestone changed from Awaiting Review to 3.2

I'll be updating the build script.

Note: See TracTickets for help on using tickets.