Since the release of WordPress 6.1 the Hosting Team has received quite a few inquiries about some of the configurations related to the Server Environment.
Within the Handbook Hosting there is a page that is updated with each new major version of WordPress, or significant change, the information of the optimal and recommended configuration from the computer, in coordination with the rest of the teams.
Since last 2022-11-16 a new update of the page is available. As always, we recommend keeping the latest versions of the various services, especially for security. For example, using the latest versions of the web server does not usually affect WordPress at all. In general, the same thing happens with databases, it is best to use the latest versions of MySQL or MariaDB, taking into account their connection with PHP.
And we come to PHP versions, which is usually the most delicate in each version of WordPress, whether in the core, plugins or themes.
In this table you can find the list of available, stable versions that were at the time of the release of each WordPress version.
| WordPress | PHP | MySQL | MariaDB | Date |
|---|---|---|---|---|
| WordPress 6.1 | 7.4 – 8.1 | 5.7 – 8.0 | 10.3 – 10.9 | 2022-11-01 |
| WordPress 6.0 | 7.4 – 8.1 | 5.7 – 8.0 | 10.3 – 10.7 | 2022-05-24 |
| WordPress 5.9 | 7.4 – 8.1 | 5.7 – 8.0 | 10.2 – 10.6 | 2022-01-25 |
| WordPress 5.8 | 7.3 – 8.0 | 5.7 – 8.0 | 10.2 – 10.6 | 2021-07-20 |
| WordPress 5.7 | 7.3 – 8.0 | 5.7 – 8.0 | 10.2 – 10.5 | 2021-03-09 |
But, to this table, we must add the compatibility of the WordPress Core in each version.
| WordPress | PHP compatible | PHP beta compatible |
|---|---|---|
| WordPress 6.1 | 5.6 – 7.4 | 8.0* / 8.1* / 8.2* |
| WordPress 6.0 | 5.6 – 7.4 | 8.0* / 8.1* |
| WordPress 5.9 | 5.6 – 7.4 | 8.0* / 8.1* |
| WordPress 5.8 | 5.6 – 7.4 | 8.0* |
| WordPress 5.7 | 5.6 – 7.4 | 8.0* |
Versions with * are those with beta compatibility. To learn more about beta compatibility, you can check out WordPress and PHP 8.0 and WordPress 5.9 and PHP 8.0-8.1. WordPress 6.1’s compatibility with PHP 8.2 is pending, although it should be noted that PHP 8.2 is not yet publicly available (it is scheduled to do so in early December 2022).
How to know which is the best stable version for each version of WordPress? Use the ServeHappy API. This API returns the best compatibility information of WordPress with PHP.
| WordPress | Minimum PHP | Recommended PHP | API JSON |
|---|---|---|---|
| WordPress 6.1 | 5.6.20 | 7.4 | JSON |
| WordPress 6.0 | 5.6.20 | 7.4 | JSON |
| WordPress 5.9 | 5.6.20 | 7.4 | JSON |
| WordPress 5.8 | 5.6.20 | 7.4 | JSON |
| WordPress 5.7 | 5.6.20 | 7.4 | JSON |
These values may vary depending on the different teams consider the change.
Although official support for PHP 7.4 will soon end, currently only with security support, several open source projects have requested the PHP Foundation to extend the support of this version until all of them are updated on their new compatibility, including WordPress, which could give that compatibility in WordPress 6.2 (taking into account the current tickets).
What is the Hosting team’s recommendation to Hosting companies? Maintain, for now, PHP 7.4 as the default version for all WordPress, and test and report compatibility with PHP 8.0, 8.1 and 8.2, when available.
If you want to help the Hosting, Core, and Test teams, test new versions and future WordPress, PHP and SQL compatibility, you can use the tool WordPress Distributed Hosting Tests (Test Runner).
Props to @Crixu for review the information.