[wp-trac] [WordPress Trac] #64393: Change how we include Gutenberg in Core

WordPress Trac noreply at wordpress.org
Thu Jan 8 20:01:50 UTC 2026


#64393: Change how we include Gutenberg in Core
------------------------------+--------------------------
 Reporter:  youknowriad       |       Owner:  youknowriad
     Type:  task (blessed)    |      Status:  reopened
 Priority:  high              |   Milestone:  7.0
Component:  Build/Test Tools  |     Version:
 Severity:  blocker           |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+--------------------------

Comment (by dmsnell):

 Thanks for your follow-up and continuing work on this @youknowriad.

 > I don't see this that different from what we were doing previously

 The main difference is that once those files were built they could remain
 stale for a very long time. I think occasionally they needed to be
 rebuilt, perhaps when files were deleted or added. Obviously if the JS
 files were stale things wouldn’t be 100% right, but I tried to address
 above how this is different than removing required PHP files.

 There is another distinction: prior to this change, with a valid `wp-
 config.php` file it was possible to checkout the code and run `require
 __DIR__ . '/src/wp-load.php';`. This is how plenty of my scripts are
 built, and how I do interactive development within the PHP shell, and how
 my tests run.

 After this change, attempting to require `wp-load.php` crashes because the
 PHP files aren’t there which Core imports. in other words, `trunk` is
 //broken// without running corrective build steps, which require network
 access, heavy downloads, and long delays.

 ----

 There’s a coincidence in my reporting because I happened to be drawn to
 parser work after finding a longstanding issue for a particular kind of
 malformed post. The `git` history is gone from the file and I can’t see my
 changes or scan back in history.

 It’s actually worse than before because with Gutenberg as a plugin I could
 have the files separate and load Gutenberg the plugin. Still, I could
 modify Core files to explore solutions and then create patches on both
 sides. Now, however, not only have I lost all version-control information
 in the PHP files that are now “built” but I also //can’t reset those
 files// because they are ignored. I have to manually copy and paste files
 between projects and files and make sure I don’t get confused.

 This is why I think we should at a minimum leave all required PHP files in
 Core that it needs to run. Moving the `npm ci` step into the installation
 is //better// than running it on every change, but when bisecting,
 benchmarking, investigating history, it’s still dramatically obstructive.

 What is the reason for deleting these files and adding them to
 `.gitignore`?

 Ideally, Core should work, albeit in a degraded state, without running any
 build, especially without running `npm` commands.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64393#comment:57>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list