PHP 5.5 has been released recently. In the same time has been announced that PHP 5.3.x branch won't be supported anymore after 5.3.27 will be released.

However WordPress requires PHP version 5.2.4 and higher. I understand that WordPress guaranties that it will work on a hosting with PHP 5.4 or 5.5 installed. But in the same time it means that I can't use PHP 5.3, 5.4 or 5.5 features in my WP development as it could cause an issue on a hosting with PHP 5.2.x installed. If I use PHP 5.3 and higher features in my plugins/themes, then they are won't be 100% compatible with WordPress.

Does anybody knows if WordPress is going to change it's requirements?

  • It's annoying, we know. Unfortunately, according to the WP stats, over 60% of WordPress installs are running on PHP 5.2, so it's doubtful to happen until this number is diminished – shea Jul 1 '13 at 9:15
  • 2
    This meta answer offers an "insider" opinion about this. – brasofilo Jul 1 '13 at 12:08

WordPress will change its requirements to use a higher version of PHP when the following cases are met:

  • A significant majority of users are running 5.3.0 or above
  • A major release cycle release approaches
  • The code/lead developers involved all agree the above two are fulfilled

Sadly, the first entry results in a vicious loop, and guarantees a significantly out of date minimum requirement that is only set to get larger now that PHP release cycles are speeding up. Hosts won't upgrade PHP if what they already have works, despite the performance and security benefits.

For a shared host it pays to have slow PHP because it forces the end user to spend money on fancier hosting such as pay monthly VPS, faster machines, dedicated machines etc.

Some hosts can be good about this, but a significant number of people are neither aware or capable of complaining about it to their hosts ( some people think PHP is something you install in your browser like flash ).

It also doesn't help that WP Core development is significantly focused on backwards compatibility, and are handicapped by their own success

So realistically, the minimum requirement will be bumped up when there's little choice but to upgrade PHP at the host level, or some massive unavoidable bug is found that requires it.

| improve this answer | |
  • This is a great page to view Wordpess install stats: wordpress.org/about/stats. #1, "significant majority of users are running 5.3.0 or above" has now been met... 16.4% are using PHP 5.2. – bafromca Mar 13 '15 at 18:46
  • That's not true, 16% might not sound like much but that's still millions of websites – Tom J Nowell Mar 13 '15 at 21:18
  • Just like Windows, Macs and their phone counterparts, there comes a time when you can upgrade and times when you can't. This doesn't hurt those hosts or users, just doesn't allow them to upgrade to the latest WP. – bafromca Mar 14 '15 at 1:16
  • 1
    Preaching to the choir, I'm of the opinion they should all upgrade to 5.4 minimum, but that's not the approach WP Core takes – Tom J Nowell Mar 14 '15 at 2:03

To add to @tom's answer, upgrading PHP version is not a risk free enterprise. The PHP developers have different ideas about backward compatibility and therefore applications might break after a PHP upgrade. This is why shared hosting can't just change the PHP version as most of their clients probably don't have the technical resources to check that their application is compatible with the new version. At least once WP core wasn't compatible with the newest PHP version so I assume that many of the older and less maintained (but fully functional otherwise) plugins might have problems with new PHP version.

But for your specific situation the answer is an easy one, just check the PHP version when your plugin/theme is being activate and put a notice if the PHP version is too old. There are many plugins that check for PHP version 5.0 and above so you will not be the first to do it.

| improve this answer | |
  • An example being something along the lines of hello_world (&$my_handy_object); which will fail in 5.4 as pass by reference was removed, or WP + 5.5 results in errors due to the removal of the mysql extension in favour of PDO/MySQLi – Tom J Nowell Jul 2 '13 at 9:48
  • @Mark, are there any stats on minimum PHP requirements that you're aware of? 5.3+ would greatly help me out, but since the library I am working on is for plugin developers, my decision to move to 5.3 would affect them too. – halfer Jul 7 '13 at 11:01
  • 1
    ok, this is more complex, I don't remember if and where you can find the info. What I can suggest is to try to contact otto or nacin. My understanding is that they both take active part in maintaining wordpress.org therefor they should have access to this info. – Mark Kaplun Jul 7 '13 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.