WordPress PHP version requirements

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.

Read More

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

Related posts

2 comments

  1. 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.

  2. 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.

Comments are closed.