Make WordPress Core

Opened 7 months ago

Last modified 3 months ago

#64494 new enhancement

Bump minimum PHP version to 8.*

Reported by: masteradhoc Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords: has-patch
Cc: Focuses: php-compatibility

Description (last modified by SergeyBiryukov)

This ticket tracks discussion and work on the next bump to the minimum PHP version to v8.0 or higher.

Policy / Criteria for Version Bumps (by @justlevine)

There is no official policy or criteria (ref) for handling PHP Version bumps. Pending that discussion, the following is based on the processes used until now:

  1. Matt is the ultimate decision maker on whether to bump the minimum PHP version.
  2. That discussion is initiated by the release/project leads based on several (public and private) factors.
  3. A general litmus test to gauge whether a version should be bumped is if the % of users (via https://wordpress.org/about/stats/) left behind by the bump is < 5%.
  4. However, usage stats alone are not reason to bump the minimum PHP Version but also have a positive impact on the project/codebase/tooling/etc.

Important: Bumping the minimum PHP version (this ticket) is not the same as changing the minimum ''recommended'' version (v8.3 as of 10 Jan 2026).

Background: #62622, #58719, #51043, #57345

Data Points

Since many years @samiamnot has monthly put the stats updates in comments of the old tickets - see backgroound above. We can continue on this ticket with tracking the appropriate data.

The Stats projection page of @johnbillion can be found here.

Note: .org Stats do not offer a cross-reference between WP/PHP versions. As such these percentages include sites that may already be (colloquially) abandoned on a previous WordPress release,but could theoretically upgrade if their plugin/theme stack supports recent WP versions.

Bumping the minimum version to v8.0 would allow us to remove a lot PHP 7.* compatibility code. The work for this release could be bigger then usual so we should communicate early for when this is planned to be set.

Projection

This could take quite some time to get below the 5% threshold. Currently as of January 2026 it sits on 22.1%. We'll see how fast it can come down.

An important comment in my view from @jrf about the big effort in maintaining WP running PHP cross-version see #58719. Hopefully we can find some other supportive measures to make users more aware that an upgrade is needed - but thats for another ticket. For the moment lets keep discussions here on how to get to 8.0 and have a space to track usage by @samiamnot

Previously

#62622 Bumping the minimum PHP version to 7.4 in WordPress 7.0
#58719 Bumping the minimum PHP version to 7.2 in WordPress 6.6
#57345 Bumping the minimum PHP version to 7.0 in WordPress 6.3
#46594 Bumping the minimum PHP version to 5.6 in WordPress 5.2
#16917 Bumping the minimum PHP version to 5.2 in WordPress 3.2

Change History (9)

#1 @SergeyBiryukov
7 months ago

  • Description modified (diff)

#2 follow-ups: @samiamnot
7 months ago

Thanks @masteradhoc for opening this. What I find interesting is that PHP 8.0 usage is low (5.82%) and dropping. It will be below 5% in the next 2 or 3 months at the current rate. PHP 8.1 (15.5%) is also dropping, but that will take a while, as will 7.4 (now at 22.33%). In all likelihood, by the time of the next bump (I do not expect this to happen for well over a year, maybe more), the minimum will probably be 8.2. This is just my wild prediction.

#3 in reply to: ↑ 2 @mukesh27
7 months ago

  • Type defect (bug)enhancement

Replying to samiamnot:

the minimum will probably be 8.2.

+1. As per https://www.php.net/supported-versions.php(https://www.php.net/supported-versions.php), security fixes for PHP 8.1 ended on January 1, 2026. Next realses, we should review PHP usage on https://wordpress.org/about/stats/(https://wordpress.org/about/stats/) and decide the path forward accordingly.

This ticket was mentioned in PR #549 on WordPress/wordpress.org by @timse201.


7 months ago
#4

  • Keywords has-patch added

related to https://core.trac.wordpress.org/ticket/64494

security fixes for PHP 8.1 ended on January 1, 2026

https://www.php.net/supported-versions.php

#5 in reply to: ↑ 2 @ZanderZ
5 months ago

Replying to samiamnot:

What I find interesting is that PHP 8.0 usage is low (5.82%) and dropping. It will be below 5% in the next 2 or 3 months at the current rate.

As expected, PHP 8.0 reached 4.9% today for the first time!

#6 @masteradhoc
5 months ago

That's great to hear! Currently we're sitting at 20.48% for PHP 7.4, so that will take some time — the threshold needs to drop below 5%. The chances are high that we'll be able to move directly to something higher than 8.0. I lean toward @samiamnot's opinion that we'll be able to push to 8.2 by the time PHP 7.4 gets below 5%.

@samiamnot will continue the analytics after the WP 7.0 release on this ticket so we'll get regular updates and track how fast we can do this change.

#7 @johnbillion
5 months ago

8.0, 8.1, and 8.2 have all peaked. It'll be interesting to see how their usage drops compared to that of 7.4.

#8 @samiamnot
3 months ago

Updated for early June 2026 based on WordPress stats.
My feeling is that it will be more than year before we can consider moving off PHP 7.4. Out of curiosity, is there an option or a reason to drop PHP 8.0 support before dropping 7.4?
@johnbillion's stats graph is really all that is needed. I would love if PHP 8.6 (currently at 0.01%) was added to the graph, despite the Nov 2026 release date being well in the future. It would also be nice if the projected next 4 months supported all versions (currently it is only done for 7.4).

Is there a way to get PHP stats just for more recent WordPress releases? If someone is on WP 4.0, we likely don't care that he is on PHP 7.4.

As of now there is no concrete plan for removing specific versions from support, so there is no total column tracking potential removals yet.

Month/YearPHP 7.4PHP 8.0PHP 8.1PHP 8.2PHP 8.3PHP 8.4PHP 8.5PHP 8.6
Jan 2025 32.60 9.55 19.25 21.30 5.80 0.30 0.00 0.00
Feb 2025 31.80 9.40 19.00 22.10 6.40 0.40 0.00 0.00
Mar 2025 31.00 9.25 18.75 22.90 7.00 0.50 0.00 0.00
Apr 2025 30.20 9.10 18.50 23.70 7.60 0.70 0.00 0.00
May 2025 29.39 8.89 18.41 24.30 8.53 0.97 0.00 0.00
Jun 2025 28.86 8.66 18.08 24.93 9.08 1.23 0.00 0.00
Jul 2025 28.22 8.48 17.55 25.49 9.86 1.51 0.00 0.00
Aug 2025 26.63 8.00 17.37 26.04 11.17 2.09 0.00 0.00
Sep 2025 25.66 7.63 17.01 26.38 12.22 2.62 0.00 0.00
Oct 2025 24.80 7.26 16.59 26.71 13.22 3.19 0.00 0.00
Nov 2025 23.85 6.94 16.15 26.93 14.37 3.78 0.00 0.00
Dec 2025 22.92 6.44 15.92 27.45 15.16 4.25 0.10 0.00
Jan 2026 22.33 5.82 15.50 27.32 16.47 4.79 0.26 0.00
Feb 2026 21.71 5.51 14.98 26.78 17.78 5.35 0.56 0.00
Mar 2026 21.10 5.19 14.46 26.25 19.09 5.92 0.87 0.00
Apr 2026 20.48 4.88 13.94 25.71 20.40 6.48 1.17 0.00
May 2026 20.03 4.89 13.57 26.51 22.00 7.05 1.34 0.01
Jun 2026 19.36 4.72 13.00 26.23 23.07 7.52 1.66 0.01

For historical reasons, here are the stats for no longer supported versions (support removed in WP 7.0) going back to 7.0. This is not changing much and many are likely "abandoned" sites that are on old versions of WP.

Month/YearPHP 7.0PHP 7.1PHP 7.2PHP 7.3PHP 7.0 - 7.3
Jan 2024 1.67 1.08 4.79 5.90 13.44%
Jan 2025 1.07 0.67 2.68 3.14 7.56%
Jan 2026 0.75 0.47 1.82 2.05 5.09%
Feb 2026 0.73 0.45 1.77 1.99 4.94%
Mar 2026 0.71 0.44 1.72 1.91 4.78%
Apr 2026 0.69 0.47 1.68 1.83 4.67%
May 2026 0.75 0.47 1.67 1.81 4.70%
Jun 2026 0.67 0.41 1.63 1.74 4.45%

#9 @masteradhoc
3 months ago

Hey @samiamnot

Thanks for updating the table again! We'll add it to the stats page soon and also add a projection.

Dropping PHP 8.0 before PHP 7.4 though wont help as WordPress and plugin/theme authors still need to support 7.4 for some time. I guess we'll have to wait a bit on this one to get finally further. But good to keep track and see where this is heading to announce a change early enough.

Is there a way to get PHP stats just for more recent WordPress releases? If someone is on WP 4.0, we likely don't care that he is on PHP 7.4.
Im not sure about this one. do you know @johnbillion — is it possible to cross the PHP numbers with the WordPress version, or at least limit them to recent releases? Probably the data is there, just not surfaced anywhere public.

Even a rough one-off snapshot of "PHP versions among WP 6.x sites" would tell us how much of the 7.4 share is on current installs vs. old sites that can't update anyway — which is really the number that matters for picking a bump date.

Note: See TracTickets for help on using tickets.