Different WordPress versions can work with multiple PHP versions. Yet, the platform recommends specific PHP requirements for each WP version. Choosing the best WordPress PHP version is crucial to make sure that the website is secure and free of bugs.
This article discusses the compatibility between PHP and WordPress in terms of the recommended, minimum, and latest PHP versions for WordPress.
IMPORTANT: This article is being checked and updated regularly by our team to reflect the most accurate and up-to-date information. In case you found anything incorrect or inaccurate please don’t hesitate to contact us.
LAST UPDATED: August 10, 2023
1. Overview
WordPress substantially relies on PHP to work and operate. Updates for both platforms are being published regularly to fix security loopholes and bring enhancements in usability and performance. Thus, WordPress users have to continuously update their software and confirm its compatibility with supported PHP versions.
WordPress PHP versions depend on the compatibility between WordPress and PHP. As each version of WP requires specific minimum PHP requirements. In this context, this article aims to explore the compatibility of the multiple versions of WordPress with PHP, in light of continuous updates being published on a regular basis for both platforms.
2. Supported PHP Versions
Updates of PHP programming language are being published regularly. The updates usually include bug fixes and security improvements besides other functional and performance enhancements.
When published, each PHP version remains supported for a period of 3 years from its initial stable release, the support period runs over two main successive phases:
- 2-Years Active Support: the support includes fixing BOTH BUGS and SECURITY ISSUES.
- 1-Year Security Support: the support includes fixing ONLY CRITICAL SECURITY ISSUES.
Once the support period is completed (after 3 years), the version reaches its end of life (EOL) and becomes no longer supported. It’s strongly not recommended to use an unsupported version of PHP as it might expose the application using it to security vulnerabilities and bugs.
3. WordPress Current PHP Versions
The official PHP website maintains a specific webpage to check the status of supported versions. Accordingly, the currently supported PHP versions that can be safely used for WordPress are:
PHP Version 7.4– No Longer Supported- PHP Version 8.0 (Security Support, ends on 26/11/2023)
- PHP Version 8.1 (Active Support, ends on 25/11/2023)
- PHP Version 8.2 (Active Support, ends on 08/12/2024)
When an older PHP version runs out of support, it is removed from the list and, usually, a new version with full support is added.
4. WordPress PHP Requirements
In general, WordPress requires specific server requirements, which cover PHP requirements, hosting details, and other software dependencies.
Technically speaking, each version of WordPress has specific PHP versions that it is compatible with. That being said, although the software might work on legacy PHP versions that reached their End Of Life, the platform recommends using only supported PHP versions.
Important: a compatible PHP version is a version that WordPress requires to work properly, regardless of whether it is still supported or not.
Here is a list of the compatible PHP versions for each version of WordPress, knowing that we only consider WP versions that can work with the currently supported PHP versions:
For details about PHP requirements for older versions of WordPress, please check this official blog.
5. WordPress Minimum PHP Versions
In terms of PHP requirements, each version of WordPress has a minimum PHP version. However, WordPress recommends always using the minimum supported version of PHP regardless of the used WordPress installation.
WordPress Minimum PHP Version is: PHP 8.0
WordPress Minimum (UNSUPPORTED) PHP Version is: PHP 5.6.20+ (this version is no longer supported and may expose your site to critical vulnerabilities)
As WordPress recommends, we highly urge you not to use the minimum version in case it is not supported, even if it is compatible with your website’s WordPress version.
For this reason, we mention here the minimum PHP requirements for each WordPress installation. Knowing that we cover only WordPress versions that are compatible with supported PHP versions.
Here is a list of the minimum PHP versions for WordPress:
WordPress Version | Minimum PHP Version | Minimum (SUPPORTED) PHP Version |
---|---|---|
WordPress 6.3 WordPress 6.3.x | PHP 7.0 | PHP 8.0 |
WordPress 6.2 WordPress 6.2.x | PHP 5.6 | PHP 8.0 |
WordPress 6.1 WordPress 6.1.x | PHP 5.6 | PHP 8.0 |
WordPress 6.0 WordPress 6.0.x | PHP 5.6 | PHP 8.0 |
WordPress 5.9 WordPress 5.9.x | PHP 5.6 | PHP 8.0 |
WordPress 5.8 WordPress 5.8.x | PHP 5.6 | PHP 8.0 |
WordPress 5.7 WordPress 5.7.x | PHP 5.6 | PHP 8.0 |
WordPress 5.6 WordPress 5.6.x | PHP 5.6 | PHP 8.0 |
For more details about minimum PHP requirements for other WordPress versions please refer to this official blog.
6. What Is The Recommended PHP Version For WordPress?
As mentioned earlier, each WordPress installation requires specific PHP requirements. That said, the best and recommended PHP version for WordPress depends on which version of WordPress is being used.
WordPress Recommended PHP Version is the latest supported version which is compatible with your website’s WordPress version.
Here is a list of the recommended PHP version for each WordPress, we only mention WP versions that are compatible with supported PHP versions:
WordPress Version | Recommended PHP Version |
---|---|
WordPress 6.3 WordPress 6.3.x | PHP 8.x* |
WordPress 6.2 WordPress 6.2.x | PHP 8.x* |
WordPress 6.1 WordPress 6.1.x | PHP 8.x* |
WordPress 6.0 WordPress 6.0.x | PHP 8.0* | PHP 8.1* |
WordPress 5.9 WordPress 5.9.x | PHP 8.0* | PHP 8.1* |
WordPress 5.8 WordPress 5.8.x | PHP 8.0* |
WordPress 5.7 WordPress 5.7.x | PHP 8.0* |
WordPress 5.6 WordPress 5.6.x | PHP 8.0* |
* Beta support and exceptions: This means the compatibility of WordPress with PHP is still being tested. If you prefer to avoid any hassles or you found it difficult to upgrade to a beta-support PHP version, we recommend using the latest fully-supported PHP version (if available) till the beta test ends. You can just follow this article for future updates.
7. What Is The Latest PHP Version for WordPress?
PHP work on a continuous basis to update their framework and fix bugs and security issues. Similarly, WordPress aims to support new versions of PHP as they are being published.
The latest version of PHP that is currently supported by WordPress is PHP 8.2 and it’s supported by WordPress 6.1, 6.2 and 6.3.
Nevertheless, the compatibility of WordPress with PHP 8.x is still in the beta support phase. That said, most WordPress functionalities will work but you might expect some minor issues to happen sometimes.
Furthermore, some plugins and themes might be not yet compatible with PHP 8.x. So we recommended checking the compatibility of your add-ons before updating to recent versions of PHP.
8. How To Check WordPress PHP Version?
To find the PHP version being used by your WP installation, you just need to follow the following simple steps:
- Log in to your
WP Admin Dashboard
. - Navigate to the sidebar menu and choose:
Tools
thenSite Health
. - From the opened interface, choose
Info
tab. - From the list displayed, navigate to
Server
section and click on the small arrow to expand it. - Here you will find your
PHP version
as well as other server details.
To read our easy guide with pictures to finding PHP version in WordPress without a plugin please refer to this article. In case you are unable to access the admin control panel, you can find the PHP version by accessing your hosting cPanel or consulting your hosting service provider.
How to Check PHP Version in WordPress Without Plugin?
There are many ways to check the PHP version being used by a WordPress installation, usually using third-party plugins. In this article, we will find step-by-step how to check PHP version in WordPress without any plugin.
9. Conclusion
To avoid vulnerabilities and obtain the best performance for your website, WordPress and PHP versions should be always compatible with each other.
In this article, we discussed the PHP requirements of WordPress platform in terms of compatibility and possibly usable PHP versions.
Sources:
- PHP Supported Versions: https://www.php.net/supported-versions.php
- WordPress Requirements: https://wordpress.org/about/requirements/
- WordPress Server Environment: https://make.wordpress.org/hosting/handbook/server-environment/
- PHP Compatibility and WP Versions: https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
I am using version 8.1 of php, it will not be a problem.
Thank you Suraj,
In fact, many others are running WordPress on PHP 8.x without noticeable problems.
However, no one can confirm this compatibility before the official WordPress do. For this reason, we usually don’t recommend using beta support PHP versions for published sites unless they are for testing purposes.
With 7.4 support ending in three months, seems like they are cutting it close with the Beta support still on 8.x
That’s correct.
This is because, according to this dev note, “PHP 8.0 is a major version update with a large number of changes that break backwards compatibility”. They also added that even if the WordPress core software is fully compatible with PHP 8.x, “The state of PHP 8 support within the broader ecosystem (plugins, themes, etc.) is impossible to know”.
Accordingly, the compatibility now is to ensure the majority of the WordPress ecosystem is becoming compatible with PHP 8.x.