WordPress 6.2, The Plugins and PHP 8.1+
PHP and WordPress versions are evolving rapidly, and we must adapt quickly. PHP 8.1 was officially released in November 2021, almost two years ago. PHP 8.1 will receive active support until the end of November 2023, which is four months from now.
A month ago, we decided to switch to PHP 8.1 and see how it goes. We always make it a habit to enable WordPress Debug to log for at least 48 hours after updating WordPress or PHP. We also protect debug.log from public view by using this directive in our .htaccess file:
<Files ~ "\.log$">
Order Allow,Deny
Deny from All
</Files>
To our surprise, we didn’t get any fatal PHP errors from WordPress 6.2.x. However, we did receive a lot of deprecated notices from WordPress plugins. These notices can be tricky to debug since some of them appear as deprecated code within WordPress files (for example, “formatting.php”), but they actually originate from various plugins and not the WordPress core. To find the real cause, you have to disable all plugins one by one. This is not an easy or quick task, especially if you have several plugins.
Do these deprecated notices harm the website? Probably not, but we would expect popular WordPress plugins to be in sync with PHP versions. The latest PHP version is 8.2, yet WordPress plugins are still using PHP 8.0 and some even PHP 7.4
We opened several topics about these issues on WordPress.org, and most of the plugins were fixed. However, some were not, and the topics were simply marked as resolved.
We received some “great” new information from their support staff, such as “it doesn’t matter, no harm done” and “turn your debug to False since it’s not safe to have it set to True on a live site.” Really? We didn’t know that!
It would be much better if plugin developers updated their code and showed kindness to people who actually care enough to report issues found in their plugins and themes. We spend our time deeply debugging your plugins, for you.
What about PHP 8?
Support for PHP 8.0, 8.1, and 8.2 in WordPress core is very good, and a proposal for the criteria for removing the “beta” support label for each new PHP version has been published.
(for WP 6.3)
Hey take a look at this compatibility information:
https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
WordPress marks PHP 8.+ as “beta support”
Again: We haven’t seen (yet?) ANY such deprecated notice coming from WordPress CORE.
Right, still all those deprecated notices ARE just some notice for future versions of PHP.
In WordPress 6.2, the most common notice is this:
True but PHP 8.1 is almost 2 years old and in a few months there will be no active support.
For me, this is pure lazyness from plugin developers, since i have yet to see any such notice from WordPress CORE.