#65451 closed task (blessed) (fixed)
Update Node.js to 24.x
| Reported by: | desrosj | Owned by: | desrosj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
This is a tracking ticket for the work required to upgrade Core to using Node.js 24.x, which is the version with Active LTS status at the time of creating this ticket.
For reference, the Core Handbook has a page documenting the related considerations and changes required when updating Node.js for WordPress and includes a checklist to follow.
Some key dates:
- 20.x reached end-of-life on April 30, 2026.
- 22.x reaches EOL on April 30, 2027
- 24.x transitions to maintenance LTS on April 30, 2027.
- 26.x is Current and transitions to Active LTS in October 2026.
- Starting with version 27, the Node.js project is transitioning from an even/odd versioning practice (even releases only reach LTS status, odd releases are not meant for production use and supported only for 6 months) to an annual one (every release reaches LTS status after a 6 month Current phase).
Previously:
Change History (51)
This ticket was mentioned in PR #11776 on WordPress/wordpress-develop by @desrosj.
5 months ago
#2
- Keywords has-patch added
This makes the necessary changes to update the versions of Node.js and npm used by WordPress Core.
Trac ticket: Core-65451.
AI assistance: None
@desrosj commented on PR #11776:
5 months ago
#3
This PR resolve Core-65432.
I don't know that this resolves Core-65432. This PR is specifically targeting Core itself and does not make any changes to the respective GitHub Actions workflow files. While the changes required to make sure actions continue to run within the GHA environment are related, they do not necessarily impact each other (the actions/setup-node action installs and configures any version of Node.js the project is using).
Also, do you have plans to wrap this up soon?
I have created Core-65451 to track this effort in Trac/wordpress-develop SVN. There has also been a significant amount of legwork around this already in https://github.com/WordPress/gutenberg/issues/72973.
As far as the current status. Upgrading Node.js is currently blocked on the Systems Team side.
#4
@
5 months ago
- Keywords has-patch removed
To link related discussions, there has been significant effort on the Gutenberg side of things in Gutneberg-72973, which included the creation of the new handbook page mentioned in this ticket's description.
There is also a project board in GitHub.
@manzoorwani.jk commented on PR #11776:
3 months ago
#7
Let us refresh this PR to prepare for the merge.
@jonsurrell commented on PR #11776:
3 months ago
#8
According to https://make.wordpress.org/systems/2026/05/06/installing-node-js-24-on-the-build-server/#comment-2549, we can go to at least 24.18.
#9
@
3 months ago
I took a look at this today and updated the PR. Here is a list of what's needed:
- #63013 is a blocker as it prevents Twenty Nineteen from using 24.x.
- #66004 is a blocker as it prevents Twenty Twenty from using 24.x.
- The corresponding Gutenberg PR looks good.
Please see the Gutenberg PR and issue for the full coordination effort.
This ticket was mentioned in Slack in #core-editor by aduth. View the logs.
3 months ago
@aduth commented on PR #11776:
3 months ago
#11
As discussed in Slack, in order for this to be ready to commit, it will need one or the other of:
- Addressing blockers within theme packages (replacing incompatible
sassandstylelint-a11ydependencies) - Or, reverting the changes that update impacted themes to Node v24 and keep them at Node v20 until we can address those blockers separately
#13
@
2 months ago
- Keywords fixed-major added
I missed the Fixes: annotation in the commit message, but r63539 applies this upgrade.
Leaving this open while we consider upgrading other branches that currently run 20.x.
This ticket was mentioned in PR #13380 on WordPress/wordpress-develop by @manzoorwani.jk.
2 months ago
#14
- Keywords has-patch added
Twenty Nineteen is the last default theme still using node-sass, deprecated since 2020. It ships no prebuilt binary for Node.js 22 or later, and its nan-based addon no longer compiles against current V8, so npm install fails on newer runtimes. This blocks #11776, where the build job errors.
This switches to sass and commits the regenerated stylesheets. The build also moves from run-p to run-s, as in Twenty Twenty-One: under run-p, build:rtl races build:style and can regenerate style-rtl.css from a stale style.css.
Non-latin fallbacks
Dart Sass drops contextual @extend selectors it considers redundant, ignoring the specificity they relied on. That cost eight selectors their non-latin font across 31 locales. %non-latin-fonts moves into its own partial imported last, so the fallbacks win on source order instead.
Verification
8907 probes across four fixtures (LTR, RTL, editor, print) in headless Chrome, hashing every computed property and pseudo-element against the node-sass output. Differences reduce to the main navigation button gaining the fallback, and sixth-decimal letter-spacing rounding. npm ci and npm run build reproduce the committed bytes on Node 20 and 24.
This branches from trunk. #13379 stacks the same commits on #11776, where the previously failing build job passes on Node.js 24.
Trac ticket: https://core.trac.wordpress.org/ticket/65451
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code, Codex
Model(s): Claude Opus 5, GPT-5.4
Used for: Diagnosing the failure, the dependency swap, and differential testing of the output; reviewed and verified by me.
@manzoorwani.jk commented on PR #11776:
2 months ago
#15
When are we planning to merge this?
@desrosj commented on PR #11776:
2 months ago
#16
This was committed in r63539, I just forgot to close this PR out.
This ticket was mentioned in PR #13834 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#18
Upgrades the 7.1 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13835 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#19
Upgrades the 7.0 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13836 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#20
Upgrades the 6.9 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13837 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#21
Upgrades the 6.8 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Supersedes #11718.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13838 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#22
Upgrades the 6.7 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13839 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#23
Upgrades the 6.6 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Supersedes #11717.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13840 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#24
Upgrades the 6.5 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
This ticket was mentioned in PR #13841 on WordPress/wordpress-develop by @manzoorwani.jk.
7 weeks ago
#25
Upgrades the 6.4 branch to Node.js 24.x, since Node.js 20.x reached end of life on April 30, 2026. Backports r63539 and r63771 without the Gutenberg hash change, applying the Grunt workaround to the npm scripts by hand since tools/gutenberg/utils.js does not exist here. Twenty Nineteen and Twenty Twenty keep their current Node.js versions, as in trunk.
Supersedes #11726.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Porting the trunk changes to each release branch.
@mukesh27 commented on PR #13841:
7 weeks ago
#26
@manzoorwanijk Can we close #11726 in favour of this PR?
@manzoorwani.jk commented on PR #13841:
7 weeks ago
#27
@manzoorwanijk Can we close #11726 in favour of this PR?
Done.
This ticket was mentioned in PR #13843 on WordPress/wordpress-develop by @mukesh27.
7 weeks ago
#28
@mukesh27 commented on PR #13841:
7 weeks ago
#29
Thanks! Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13840:
7 weeks ago
#30
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13839:
7 weeks ago
#31
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13838:
7 weeks ago
#32
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13837:
7 weeks ago
#33
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13836:
7 weeks ago
#34
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13835:
7 weeks ago
#35
Let's bump node and npm versions in README.MD file similar to #13843
@mukesh27 commented on PR #13834:
7 weeks ago
#36
Let's bump node and npm versions in README.MD file similar to #13843
@lancewillett commented on PR #13843:
7 weeks ago
#38
PR #13843 landed in https://core.trac.wordpress.org/changeset/64025
This ticket was mentioned in Slack in #core by im3dabasia1. View the logs.
3 weeks ago
@desrosj commented on PR #13380:
12 days ago
#40
It looks like this was addressed as part of r64387.
This ticket was mentioned in PR #13338 on WordPress/wordpress-develop by @desrosj.
12 days ago
#41
The `@double-great/stylelint-a11y` package is a seemingly well maintained fork of the original stylelint-a11y, which has not been updated for over 7 years and is incompatible with newer versions of Stylelint and Node.js.
This PR:
- Replaces
stylelint-a11ywith the latest version of@double-great/stylelint-a11y(^3.8.3). - Replaces the deprecated
stylelint-config-wordpresswith@wordpress/stylelint-configin.stylelintrc.json. - Adds
:focusselectors to the editor's Button and File block hover styles to match the front end. In the editor, these elements areRichText(contenteditable) fields and do receive focus. This resolves the onlya11y/selector-pseudo-class-focusviolation. - Updates Twenty Twenty to Node.js 24.x (
.nvmrc,engines, anddevEngines), bringing it in line with Core and the other default themes. This was the last remaining item for Core-65451.
The theme's build output is unchanged on Node.js 24.x. npm run lint:css now runs again, but it reports existing violations of other rules from the newer @wordpress/stylelint-config (mostly selector-class-pattern for block class names). These can be addressed in a follow-up.
Trac ticket: Core-66004.
See Core-65451.
Use of AI Tools
Cursor with Composer 2.5 was used to analyze the situation for possible ways to fix this issue. Claude Code (Claude Opus 5.5) was used to verify the editor focus behavior, update the editor styles, upgrade the theme to Node.js 24.x, and update the dependency.
---
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.
🤖 Generated with Claude Code
@desrosj commented on PR #13338:
12 days ago
#42
@sabernhardt I think this is ready to go. Do you mind giving it a review?
#43
@
12 days ago
I think the only thing remaining for trunk is to review and commit the PR on #66004.
As far as updating older branches, it seems like the workflow that tests the gutenberg build process within the src/wp-content/plugins directory fails on every branch 6.9 through 6.5 because of the Node.js mismatch.
One way to fix this would be to update the wp/x.y branch in gutenberg first. Then this should pass when the corresponding wordpress-develop branch is updated to use 24.x.
Another option is to simply remove those jobs from these branches. They were removed in r61438 and all branches >=7.0 no longer perform this type of testing. When introduced it was meant to ensure no problems were introduced for contributors who had gutenberg cloned into the src/wp-content/plugins directory. I don't think that's that important anymore within old branches.
I am currently leaning towards removing those jobs, but would love some additional opinions. Tagging a few other component maintainers: @jorbin @johnbillion @lucatume @adrianmoldovanwp @lancewillett.
Just to rehash, the ideal end state is for all branches using Node.js 20.x to be upgraded to now use 24.x, which brings tooling across branches in to a more consistent state. This would mean 7.1-6.4 would run 24.x, and 6.3-4.7 would run 14.x.
#44
@
12 days ago
Also pinging @manzoorwanijk who prepared the backport PRs as I don't believe activity on GH will subscribe someone to Trac ticket updates.
#45
follow-up:
↓ 46
@
11 days ago
I've been researching this and I believe every branch from 4.7 up, in Core and the Gutenberg wp/x.y branches, can move to 24.x with minimal changes. Built files match the shipped releases. I didn't check QUnit, eslint, e2e, etc, but I'm happy to open PRs and we can get results from CI. Expected changes are like this:
- 5.1 to 5.7, and Gutenberg
wp/6.5towp/6.8: regenerate the lockfile withnpm install --package-lock-only, because npm 11 rejects entries npm 10 accepted. This is why the Gutenberg build jobs fail on 6.5 to 6.8. - 5.0 to 6.0:
--openssl-legacy-provider, for md4 hashes under OpenSSL 3. - Converted lockfiles:
legacy-peer-deps = truein.npmrc(5.9 and 6.3 fail to install without it). - 5.5 and 5.6: an
overridesentry replacingnode-sass(from@wordpress/scripts12) withsass. The build doesn't use it.
#46
in reply to: ↑ 45
@
11 days ago
Replying to jonsurrell:
I've been researching this and I believe every branch from 4.7 up, in Core and the Gutenberg
wp/x.ybranches, can move to 24.x with minimal changes.
Very interesting! And thanks for working on that. In the interest of the 7.2 release and this ticket, let's leave this open only until #66004 is resolved and create a new ticket for tracking the work to upgrade older branches.
@sabernhardt commented on PR #13338:
11 days ago
#48
I was wrong about the .wp-block-button__link and .wp-block-file__button elements not receiving the focus state in the editor. With the patch, the text of the button-styled link is underlined as I type within a Button or File block because the div has focus (tabindex=0). This style might not be a problem, but the underline is new and unnecessary in the context.
I also ran the following commands to check for any changes: npm install, npm audit fix, npm dedupe, and npm run build. The `audit fix` and `dedupe` commands edited the package-lock.json file, which might have further updating if the commands are run again another day.
On a side note, the vendor prefix build process does not work, and I would prefer to remove _those_ dependencies instead of trying to fix them.
Related #65432.