(※現在はこのサーバはOpenLiteSpeed+PHP8+Wordpressで稼働しています。)

さてさて、せっかくインストールしたPHP8ですが、Wordpressはまだ動かない。

ならば他のCMSを試してみよう?!と考えておりましたが、12月8日にPHP8で動作するWordpress5.6がリリースされるようです。

しかし、どうもまだPHP8を本格運用するのは待った方がいいようです。

このような記事を見つけましたので紹介しておきます。

https://www.searchenginejournal.com/wordpress-5-6-compatibility-php-8/388686/


12月8日にリリースされるWordpress5.6はベータ互換

“WordPress Core aims to be compatible with PHP 8.0 in the 5.6 release (currently scheduled for December 8, 2020).

…Significant effort has been put towards making WordPress 5.6 compatible with PHP 8 on its own, but it is very likely that there are still undiscovered issues remaining.”

https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/

まだ発見されない課題、問題が残っていると予想されるとのことです。


“It also should be acknowledged that WordPress is never used in isolation (without any theme or plugins), so WordPress itself being able to run on PHP 8 does not indicate “full” compatibility.

The state of PHP 8 support within the broader ecosystem (plugins, themes, etc.) is impossible to know. For that reason, WordPress 5.6 should be considered “beta compatible” with PHP 8.”

https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/

プラグインやテーマがPHP8に対応しているか?

WordPressはテーマや、プラグインなしで使われることはない。プラグインやテーマがPHP8に対応しているか確認することは不可能だからベータ扱い、ということのようです。

まさにその通りですかね。多分このあたりがポイントですね。

“…we have identified that create_function is still used in over 5,500 WordPress plugins, including extremely popular plugins with millions of installations. In some cases use of these deprecated functions may be intended for backwards compatibility with older versions of PHP.
Many plugins, however, will need extensive refactoring as PHP 8 becomes more utilized.”

https://www.wordfence.com/blog/2020/11/php-8-what-wordpress-users-need-to-know/

もちろん徐々に多く使われるプラグインやテーマはPHP8向けにリファクタリング(コードが書き換えられて)されていくでしょう。

“Only a small percentage of the available plugins, the more popular and professionally developed ones, have automated tests in place. This is worrisome as generally speaking, the average WordPress site runs about 19 or 20 plugins.

…However, more than anything, the plugins/themes which have tests are likely the ones where the least amount of PHP 8.0 problems can be expected as they use a professional development model.

The multitude of plugins and themes without tests are much more cause for concern as these will more likely to be problematic when run on PHP 8.

PHP 8 is going to contain a lot of breaking changes.”

“…it is highly recommended that you thoroughly test your site before upgrading to PHP 8.”

https://developer.yoast.com/blog/the-2020-wordpress-and-php-8-compatibility-report/#h-testing-plugins-and-themes

最後に、PHP8にアップデートする前に全体のテストをすることをオススメしますとのこと、まこれ当たり前のことですけどね。

んじゃ、PHP8って何が変わったんだっけ?

以下に記載されていました。

PHP 7.4.x から PHP 8.0.x への移行

新機能は良いですが、下位互換性のない変更点が結構ありますね。
これは業務アプリの場合は修正や動作確認に時間かかりそうですナァ。