This is the official blog for the core development team of the WordPress open source project. Follow our progress with weekly meeting agendas, project schedules, and the occasional code debate.
For WordPress 2.7 and higher, 7.56% are using PHP 4.
For WordPress 2.7 and higher, 3.60% are using PHP 5.0.x or 5.1.x.
Combined, that is 11.16% of WordPress installs using a PHP version lower than 5.2.
However, we considered that people running an older branch of WordPress might be disproportionately using older versions of PHP, because of self-managed servers or a lazy hosting provider. We’re waiting on that data. Little elves are running in a hamster wheel.
It is expected that if we announce an EOL for PHP versions less than 5.2, and give enough warning, that some hosts will upgrade (or change their default). So those numbers will go down. Also consider that both Drupal and Joomla are going to require PHP 5.2 sometime this year. If WordPress was on board, that would be a heck of a motivating factor for the laggards.
Big and excellent move. It might be the right time to launch such a discussion, with the current cycle focused on 3.org, minds can still be made before the team moves into actual coding in September. If we count an approximate 3 months of dev time for 3.1 (provided that is the version that would receive such treatment), that leaves half a year of Internet-evolution before the move is applied.
Now of course, it might be decided to go slow and only place some more PHP5 warnings into the 3.1 code, and make the complete move at a later time (PHP5 -> 3.5? argl).
Now, one thing that could be useful, along with phone-home stats, is to dive into a list of hosts and see how well they are prepared for such a move — and maybe start a mailing campaign to get ready.
A joint announcement with Drupal and Joomla would certainly help, too.
Drupal made their plans known a few years ago that version 7 would be PHP 5.2. I’m not sure when Joomla announced their plans, but 1.6 is currently in late beta and it also requires PHP 5.2.
My opinion (at least before we queried these stats yesterday) is in 3.2 we should bump the limit, remove compat code, etc. What’s killing us is testing coverage, not the lack of PHP5 features. If we do any “You’re running PHP 4″ warnings that’d be for 3.1. But we’ll discuss at the dev meeting. Most importantly, reaching a decision and announcing a firm date now provides hosts a timeline.
And we can wish and hope all we want, but a three month dev cycle just isn’t going to happen
What’s killing us is testing coverage, not the lack of PHP5 features.
I suspect the real harm is an invisible brain drain. Why would PHP programmers be eager to contribute code to a project that requires them to use a dead language, in particular a dead syntax?
They already have an established interest in the project
They don’t really know enough to care
They have mercenary motivations
Excluded are those who love to program, are new to WordPress, and know what they’re doing. It would be hard to prove we’ve lost too many of those kinds of people until it’s too late.
If we decide on 3.2, I would recommend that we incorporate that knowledge the update-core.php. It could display an error message at the top & prevent upgrades to 3.2 or higher.
While we are in there core_upgrade_preamble() could use another action call. It makes sense to have one up right where the announcements are echoed out.
WordPress 3.0 already includes a PHP/MySQL version check before upgrades, I’m pretty certain that displays a warning and prevents updates if they dont match..
I’m down for 3.2, or more generally whatever release is in Q1 of 2011.
That’d be 3.1 then, which isn’t bad, and we can simply tell hosting companies Q1. I said 3.2 originally but I didn’t realize the stats were in our favor to do this sooner. This also prevents us from needing to do any major refactoring or feature development in 3.1 but still need to use PHP 4 syntax and constructs (lame duck). 3.org also gives us an additional cushion that allows us to aim for 3.1 — hosting companies will have a solid 6-7 months to make adjustments.
Should we bump to 5.3 as recommended?
More people are on 4.4 than 5.3, so the stats just don’t support that, unfortunately. The good thing is, the stats do solidly support a jump to 5.2.
For everyone’s reference, here’s the stats for all WordPress 2.7+ installs:
I wouldn’t be surprised if a large portion of the 5.3 installs are local development installs where people have control and tend to run the latest version of things.
5.3 deprecates a lot of stuff. We’re good with WordPress, but a lot of other scripts likely won’t be and I bet a lot of hosts are holding off as a result.
What are the stats for 2.9+? I think we should only consider the people that are likely going to upgrade to the next version of WordPress. What would you do if you knew that 6% of installs would never upgrade from WordPress 2.7 and would never upgrade PHP from version 4.4… until their servers killed over. Is there any correlation between running an outdated version of PHP and an older version of WordPress?
@Dan: I think it’s safe to assume that there is enough of a correlation to bring down the percentages a bit for older versions of PHP, though probably not much. Mark said he was waiting on that data. (“Little elves are running in a hamster wheel.”) We’ll make sure to have it for Thursday, though I think the 2.7+ data is plenty persuasive on its own.
PHP6.0 should not be considered at the moment as news suggests that the PHP developers might go in a new direction with regards to what PHP6.0 is. As of right now, I’d suggest you think of PHP5.3 as PHP6.0 until new details comes out.
5.3 has had some problems (5.3.1 had some serious issues that breaks things) and it really isn’t there yet on enough hosts for it to be a viable target. I say go for 5.2 compatibility, or just 5.0+ compatibility.
5.2 is considered the nice, stable version and is 3+ years old now. It’s still under active development. This is an *excellent* minimum requirement.
5.3 is considered the greatest thing evar(!) if you’re using a framework or working on Windows. For the rest of us, it has some cool features, but still *low* penetration. This is a reasonable *recommendation*.
What was supposed to be 6.0 was moved to a branch and the whole approach is being re-evaluated. In my personal opinion, it looks like a lot of the motivation/drive behind it has died. Don’t touch it.
All of that said, if you require 5.2 as a minimum, you should make sure it’s 5.3 compatible and doesn’t throw all kinds of E_Deprecated warnings. Some plugins are likely to misbehave if you leave any.
The stats for WP 2.9+ weren’t significantly different. 85.2% on 5.2, and 3.2% on 5.3. Regardless, I still feel strongly about targeting PHP 5.2 for our first 2011 release.
From the more general PHP perspective.. going 5.3 only is *very* premature. Some of the major frameworks – name the Zend Framework, Symfony, and Lithium (build by some of the CakePHP team) – are or are going 5.3 by Q1 2011, but they target and reach a completely different segment than the average WordPress installation. My 0.02.
Suggested topic: Initial 3.org contact reports by the 6 team leads:
API Reference. Andrew Nacin
Handbooks: Jane Wells
bbPress: John James Jacoby
PI: Support: Mark Jaquith
PI: Commmunity: Peter Westwood
PI: Core: Ryan Boren
I don’t think we can require PHP 5.3 until it’s widely available in the popular Linux package repositories. Debian current stable, for example, has the PHP 5.2.x package.
Yeah, there are new functions like json_decode that sound really neat, but I’m not sure all this new fangled “jason” stuff 5.0 gives us will ever catch on. SERIALIZATION FTW!
Yes, it’s recommended. Since we’re going to make a big push around hosts, it would be worth getting them on something we’re comfortable with for 3-4 years down the road.
I’ve always wondered about the stats we see from hosted users. Are there really a lot of hosts that *only* offer PHP4? Or are there a lot of hosts that have both available, but default to PHP4, or users who came on board with PHP4 and don’t know/care that PHP5 is an available upgrade?
[...] The PHP 5 demanding part of the wordpress user-base has started to jubilee over the long awaited decision and reacted quite actively and positive to the announcements. [...]
Mark Jaquith 7:55 pm on July 9, 2010 Permalink
PHP 4 EOL discussion.
filosofo 2:59 am on July 10, 2010 Permalink
What do the current phone-home stats show as the version use?
Mark Jaquith 5:20 am on July 10, 2010 Permalink
For WordPress 2.7 and higher, 7.56% are using PHP 4.
For WordPress 2.7 and higher, 3.60% are using PHP 5.0.x or 5.1.x.
Combined, that is 11.16% of WordPress installs using a PHP version lower than 5.2.
However, we considered that people running an older branch of WordPress might be disproportionately using older versions of PHP, because of self-managed servers or a lazy hosting provider. We’re waiting on that data. Little elves are running in a hamster wheel.
It is expected that if we announce an EOL for PHP versions less than 5.2, and give enough warning, that some hosts will upgrade (or change their default). So those numbers will go down. Also consider that both Drupal and Joomla are going to require PHP 5.2 sometime this year. If WordPress was on board, that would be a heck of a motivating factor for the laggards.
Xavier 11:58 am on July 10, 2010 Permalink
Big and excellent move. It might be the right time to launch such a discussion, with the current cycle focused on 3.org, minds can still be made before the team moves into actual coding in September. If we count an approximate 3 months of dev time for 3.1 (provided that is the version that would receive such treatment), that leaves half a year of Internet-evolution before the move is applied.
Now of course, it might be decided to go slow and only place some more PHP5 warnings into the 3.1 code, and make the complete move at a later time (PHP5 -> 3.5? argl).
Now, one thing that could be useful, along with phone-home stats, is to dive into a list of hosts and see how well they are prepared for such a move — and maybe start a mailing campaign to get ready.
A joint announcement with Drupal and Joomla would certainly help, too.
Andrew Nacin 12:07 pm on July 10, 2010 Permalink
Drupal made their plans known a few years ago that version 7 would be PHP 5.2. I’m not sure when Joomla announced their plans, but 1.6 is currently in late beta and it also requires PHP 5.2.
My opinion (at least before we queried these stats yesterday) is in 3.2 we should bump the limit, remove compat code, etc. What’s killing us is testing coverage, not the lack of PHP5 features. If we do any “You’re running PHP 4″ warnings that’d be for 3.1. But we’ll discuss at the dev meeting. Most importantly, reaching a decision and announcing a firm date now provides hosts a timeline.
And we can wish and hope all we want, but a three month dev cycle just isn’t going to happen
filosofo 2:34 pm on July 10, 2010 Permalink
I suspect the real harm is an invisible brain drain. Why would PHP programmers be eager to contribute code to a project that requires them to use a dead language, in particular a dead syntax?
Excluded are those who love to program, are new to WordPress, and know what they’re doing. It would be hard to prove we’ve lost too many of those kinds of people until it’s too late.
Xavier 12:12 pm on July 10, 2010 Permalink
Somehow, I know you’d burn me on the “3 months dev cycle” thing
Andrew Nacin 3:01 pm on July 10, 2010 Permalink
filosofo: Excellent points.
Brian Layman 6:49 pm on July 10, 2010 Permalink
If we decide on 3.2, I would recommend that we incorporate that knowledge the update-core.php. It could display an error message at the top & prevent upgrades to 3.2 or higher.
While we are in there core_upgrade_preamble() could use another action call. It makes sense to have one up right where the announcements are echoed out.
Dion Hulse 1:17 am on July 11, 2010 Permalink
WordPress 3.0 already includes a PHP/MySQL version check before upgrades, I’m pretty certain that displays a warning and prevents updates if they dont match..
Brian Layman 2:16 am on July 11, 2010 Permalink
You, Sir, are correct. It’s built into list_core_update(). Good catch.
Matt 6:05 am on July 11, 2010 Permalink
I’m down for 3.2, or more generally whatever release is in Q1 of 2011.
Should we bump to 5.3 as recommended?
Andrew Nacin 6:16 am on July 11, 2010 Permalink
That’d be 3.1 then, which isn’t bad, and we can simply tell hosting companies Q1. I said 3.2 originally but I didn’t realize the stats were in our favor to do this sooner. This also prevents us from needing to do any major refactoring or feature development in 3.1 but still need to use PHP 4 syntax and constructs (lame duck). 3.org also gives us an additional cushion that allows us to aim for 3.1 — hosting companies will have a solid 6-7 months to make adjustments.
More people are on 4.4 than 5.3, so the stats just don’t support that, unfortunately. The good thing is, the stats do solidly support a jump to 5.2.
For everyone’s reference, here’s the stats for all WordPress 2.7+ installs:
4.3 – 1.3%
4.4 – 6.3%
5.0 – 0.1%
5.1 – 3.5%
5.2 – 85.4%
5.3 – 3.4%
Peter Westwood 9:54 am on July 11, 2010 Permalink
I wouldn’t be surprised if a large portion of the 5.3 installs are local development installs where people have control and tend to run the latest version of things.
5.2 looks like the key winner here.
Alex M. 10:26 am on July 11, 2010 Permalink
+1 to 5.2
5.3 deprecates a lot of stuff. We’re good with WordPress, but a lot of other scripts likely won’t be and I bet a lot of hosts are holding off as a result.
Dan Cole 4:05 pm on July 11, 2010 Permalink
What are the stats for 2.9+? I think we should only consider the people that are likely going to upgrade to the next version of WordPress. What would you do if you knew that 6% of installs would never upgrade from WordPress 2.7 and would never upgrade PHP from version 4.4… until their servers killed over. Is there any correlation between running an outdated version of PHP and an older version of WordPress?
Andrew Nacin 4:24 pm on July 11, 2010 Permalink
@Dan: I think it’s safe to assume that there is enough of a correlation to bring down the percentages a bit for older versions of PHP, though probably not much. Mark said he was waiting on that data. (“Little elves are running in a hamster wheel.”) We’ll make sure to have it for Thursday, though I think the 2.7+ data is plenty persuasive on its own.
Brian Layman 3:43 pm on July 12, 2010 Permalink
Does making the recommended php version 5.3 help move us toward to 6.0 compatibility?
The Backwards Incompatible Changes list doesn’t look too bad over 5.2: http://us2.php.net/manual/en/migration53.incompatible.php
And the E_DEPRECATED error level should help mitigate any issues that do arise: http://php.net/manual/en/migration53.deprecated.php
The required version would be 5.2 right?
scribu 9:07 pm on July 12, 2010 Permalink
Oh… my… god. Finally, we have reached the mythical PHP4 < 10%.
PHP 5.2 is the way to go.
Jacob Santos 9:23 pm on July 12, 2010 Permalink
PHP6.0 should not be considered at the moment as news suggests that the PHP developers might go in a new direction with regards to what PHP6.0 is. As of right now, I’d suggest you think of PHP5.3 as PHP6.0 until new details comes out.
Otto 9:57 pm on July 12, 2010 Permalink
5.3 has had some problems (5.3.1 had some serious issues that breaks things) and it really isn’t there yet on enough hosts for it to be a viable target. I say go for 5.2 compatibility, or just 5.0+ compatibility.
Keith Casey 2:00 am on July 13, 2010 Permalink
From the PHP perspective:
All of that said, if you require 5.2 as a minimum, you should make sure it’s 5.3 compatible and doesn’t throw all kinds of E_Deprecated warnings. Some plugins are likely to misbehave if you leave any.
Alex M. 2:06 am on July 13, 2010 Permalink
@Keith: All my WordPress sites run PHP 5.3. It was a bit rough at first with all of the warnings, but they were resolved long ago.
Ramoonus 1:56 pm on July 16, 2010 Permalink
What are the numbers on PHP 5.2 and 5.3?
Mark Jaquith 10:33 pm on July 12, 2010 Permalink
The stats for WP 2.9+ weren’t significantly different. 85.2% on 5.2, and 3.2% on 5.3. Regardless, I still feel strongly about targeting PHP 5.2 for our first 2011 release.
hakre 12:02 am on July 11, 2010 Permalink
Did someone misread the haiku statement?
Keith Casey 12:12 am on July 12, 2010 Permalink
From the more general PHP perspective.. going 5.3 only is *very* premature. Some of the major frameworks – name the Zend Framework, Symfony, and Lithium (build by some of the CakePHP team) – are or are going 5.3 by Q1 2011, but they target and reach a completely different segment than the average WordPress installation. My 0.02.
Brian Layman 3:21 pm on July 12, 2010 Permalink
Suggested topic: Initial 3.org contact reports by the 6 team leads:
API Reference. Andrew Nacin
Handbooks: Jane Wells
bbPress: John James Jacoby
PI: Support: Mark Jaquith
PI: Commmunity: Peter Westwood
PI: Core: Ryan Boren
filosofo 4:02 pm on July 12, 2010 Permalink
I don’t think we can require PHP 5.3 until it’s widely available in the popular Linux package repositories. Debian current stable, for example, has the PHP 5.2.x package.
Brian Layman 4:11 pm on July 12, 2010 Permalink
I definitely agree, but I don’t think that is what was being discussed.
Matt’s wording “Should we bump to 5.3 as recommended?” could be read either way but I think he is referring to this section of the codex:
http://codex.wordpress.org/Hosting_WordPress#Recommended_setup
We already recommend 5.2 today. This is a just a soft push forward. The required and recommended versions are not often identical.
filosofo 4:30 pm on July 12, 2010 Permalink
You’re right. Sleep deprivation had me reading “recommended” as “required.”
filosofo 4:31 pm on July 12, 2010 Permalink
Either that or I’m just so giddy about being able to kick PHP 4 into the rubbish heap.
Brian Layman 4:39 pm on July 12, 2010 Permalink
Yeah, there are new functions like json_decode that sound really neat, but I’m not sure all this new fangled “jason” stuff 5.0 gives us will ever catch on. SERIALIZATION FTW!
Matt 5:10 pm on July 12, 2010 Permalink
Yes, it’s recommended. Since we’re going to make a big push around hosts, it would be worth getting them on something we’re comfortable with for 3-4 years down the road.
Dougal 3:25 pm on July 14, 2010 Permalink
I’ve always wondered about the stats we see from hosted users. Are there really a lot of hosts that *only* offer PHP4? Or are there a lot of hosts that have both available, but default to PHP4, or users who came on board with PHP4 and don’t know/care that PHP5 is an available upgrade?
I suspect the latter, but have no evidence.
WordPress drops PHP 4 in Q1 2011 | hakre on wordpress 5:19 pm on July 14, 2010 Permalink
[...] The PHP 5 demanding part of the wordpress user-base has started to jubilee over the long awaited decision and reacted quite actively and positive to the announcements. [...]
Andy Skelton 5:04 am on July 15, 2010 Permalink
Suggested topic: bot@im.wordpress.org What do you want to subscribe to?
Chossing a good minimum PHP version 5:28 am on July 15, 2010 Permalink
[...] WPDevel is going on regards leaving PHP4 behind, and which PHP5 version to move too. From their own stats on WP installs, 85.4% use [...]
demetris 10:19 am on July 15, 2010 Permalink
Set up team to evaluate shared-hosting providers for WP.org recommendations.
Trac ticket of the proposal: http://core.trac.wordpress.org/ticket/14087
This is also tangentially connected to the PHP4 EOL discussion.