Codex Home → Getting Started → PHP version support
PHP version support
BP supports the latest versions of PHP
BuddyPress supports all stable versions of PHP officially supported by the PHP project.
For the best security and performance, site admins are strongly encouraged to run the latest stable PHP.
BuddyPress 6.0.0 will require at least PHP 5.6
Legacy PHP support
In addition to the official supported releases, BuddyPress maintains support for a number of legacy PHP versions.
Justification for legacy support
Like WordPress, BuddyPress is meant to be easy to install and use on a large number of hosting environments. The statistics collected on wordpress.org indicate that a large number of WordPress installations continue to be hosted on out-of-date versions of PHP. (The stats breakdown for BuddyPress installations shows a similar spread.) For certain legacy versions, dropping support in a backward-incompatible way would break tens of thousands of websites. We choose not to be so strict that a majority of BP installations cannot run the software.
How we decide
At the beginning of each major development cycle (roughly three times per year), the BuddyPress team decides on the minimum PHP version that will be supported by the following major release. Thus, at the beginning of the 2.7 cycle, decisions are made about support in 2.8. This gap allows enough time for deliberation as well as for developer outreach.
The following considerations are weighed in the decision about whether to drop support for a legacy PHP version:
Usage – When a legacy version of PHP drops below a certain percentage of total installations – as gauged by the publicly available stats or by more BuddyPress-specific numbers reported by the wordpress.org team – it becomes a candidate for removal. The rule-of-thumb threshold for consideration is 5% of modern (say, 2.0+) BuddyPress installations.
Benefits – Some versions of PHP have introduced more significant features than others. If dropping support for a given version of PHP would allow for vastly improved development practices, removing support for that version will be a higher priority.
These are rough guidelines. In some cases, it may be worth obsolescing thousands of sites because the downsides of supporting the legacy version are so great. In others, the practical benefits of increasing our minimum version may be so minimal that it’s not worth breaking any sites at all.
Decisions will be made by the core team during a regularly scheduled dev chat.
What does “support” mean?
When we say that BuddyPress “supports” a version of PHP, we mean the following:
BuddyPress should run error-free (ie, without fatal errors or PHP notices) on the PHP version.
If a new version of BP includes a feature that requires a more recent version of PHP, the feature should be gracefully disabled on earlier PHP versions.
The PHP version will be included in our automated testing build matrix.
By extension: When we “drop support” for a legacy version of PHP, it means we stop including it in our builds, stop answering support questions related to that specific PHP version, and stop putting function_exists() checks (and the like) targeting that version when building new BP features.