Post by account_disabled on Dec 12, 2023 20:03:30 GMT 14
是时候为您的 WordPress 网站告别 HHVM 了。我们不再在 Kinsta 提供对 HHVM 的支持。它从未得到官方支持,WordPress 团队一年多前就停止了测试。HHVM v3.30也将是支持 PHP 的最后一组版本。 由于日益严重的兼容性问题、性能下降以及不支持 PHP,它不再是生产 WordPress 网站的可行解决方案。这就是我们从 2018 年 8 月 20 日开始针对所有客户逐步淘汰 HHVM的原因。 如果您当前在网站上使用 HHVM,请继续阅读下文以了解此更改的影响以及您应该做什么。我们还将讨论为什么这不是坏消息。 HHVM 背景 HHVM 不再是 WordPress 的可行解决方案 HHVM 生命周期终止 (EOL) 从 HHVM 切换到 PHP HHVM 背景 在我们调查 HHVM 离开的原因之前,让我们首先快速了解一下 Kinsta 开始支持它的原因。 这一切都始于一个名为 Facebook 的小网站(或者曾经是一个小网站)。 它最初是用 PHP 编写的,当网站开始起飞时,满足所有请求所需的计算能力是惊人的。这主要是由于当时可用的 PHP 引擎效率低下。于是 Facebook 的工程师和开发者想出了一个绝妙的主意。与其简单地购买更多服务器,为什么不在软件层面解决问题呢? 因此他们创建了一个名为HPHPc的 PHP 到 C++ 编译器。原始 PHP 代码被编译成可执行二进制文件(有时文件大小达到千兆字节!)并执行,而不是编译成操作码并解释。
这使得性能提高了大约六倍,这是巨大的!六倍的速度似乎并不算多,但让我们试着正 电话号码清单 确看待这一点。您不必购买 600 台服务器来为 Web 服务提供支持,而只需 100 台。这就是令人难以置信的节省,因为您改变了运行代码的方式。 然而,正如您可能想象的那样,运行和维护单独的 HipHop 开发者版本和调试器版本(分别称为 HPHPi 和 HPHPd),以及在仅进行几次代码更改(想想错误修复)后向每台计算机分发千兆字节的可执行文件,它很快成为问题和挑战。 因此,2013 年 Facebook 决定弃用HPHPc,而是回收代码和获得的经验,将其投入生产至少三年,并推出HipHop 虚拟机(HHVM)。该引擎将 PHP 转换为字节码,然后由即时 (JIT) 编译器在运行时进行转换。这反过来又带来了更大的性能提升! HHVM HHVM Kinsta 的许多高要求、高流量站点多年来都使用了 HHVM,并且加载时间显着缩短。HHVM 还允许对象缓存,这是 WordPress 引入的内部缓存系统,用于将数据库中的数据存储在PHP 内存中。这通过减少数据库调用次数来提高数据库效率并减少 PHP 执行时间。这意味着 HHVM 一直非常适合包含大量不可存储内容的动态站点。 但是,话虽这么说,不幸的是,就 WordPress 和 PHP 而言,HHVM 已经走到了尽头。我们将在下面找出原因。 HHVM 不再是 WordPress 的可行解决方案 以下只是 HHVM 对于 WordPress 和 Kinsta 客户来说不再是一项好技术的众多原因中的几个。
首先,HHVM从 v3.30 版本开始终止了对 PHP 的支持。 其次,需要指出的是,HHVM实际上从未得到 WordPress 的正式支持。感谢 WordPress 核心团队中一些痴迷于速度的成员(#27881),它得以兼容。一些 WordPress 托管提供商(例如 Kinsta)已将其提供给客户(我们于 2016 年推出),以便他们能够利用性能提升。 WordPress 实际上从 2017 年 5 月(几年前)起就停止将 HHVM 纳入其核心测试基础设施中。WordPress 核心开发人员 John Blackbourn 说道: 如果您在 HHVM 上运行 WordPress 网站,您应该考虑迁移到 PHP 7+,它受到更多支持和测试,并提供 HHVM 带来的所有内存和性能优势。 由于 HHVM 不再由 WordPress 核心团队成员进行测试,错误和兼容性问题开始出现。其中许多都是我们亲眼所见的(#8194)。大约一年前,随着最新版本的 HHVM 的出现,一开始的一些故障已经变成了源源不断的故障,现在正在影响流行的第三方 WordPress 主题和插件的功能。因此,HHVM 不再是WordPress 网站的稳定或合适的解决方案。 除了支持 HHVM 托管之外,我们的 PHP 与 HHVM 基准测试表明PHP 7.2 实际上比 HHVM 更快。PHP 有史以来第一次在所有测试中获胜,其中包括独立 WordPress 网站、WooCommerce 和 Easy Digital Downloads。基准(PHP 与 HHVM) WordPress 基准(PHP 与 HHVM) PHP 7.3 和 7.4甚至更快。
这使得性能提高了大约六倍,这是巨大的!六倍的速度似乎并不算多,但让我们试着正 电话号码清单 确看待这一点。您不必购买 600 台服务器来为 Web 服务提供支持,而只需 100 台。这就是令人难以置信的节省,因为您改变了运行代码的方式。 然而,正如您可能想象的那样,运行和维护单独的 HipHop 开发者版本和调试器版本(分别称为 HPHPi 和 HPHPd),以及在仅进行几次代码更改(想想错误修复)后向每台计算机分发千兆字节的可执行文件,它很快成为问题和挑战。 因此,2013 年 Facebook 决定弃用HPHPc,而是回收代码和获得的经验,将其投入生产至少三年,并推出HipHop 虚拟机(HHVM)。该引擎将 PHP 转换为字节码,然后由即时 (JIT) 编译器在运行时进行转换。这反过来又带来了更大的性能提升! HHVM HHVM Kinsta 的许多高要求、高流量站点多年来都使用了 HHVM,并且加载时间显着缩短。HHVM 还允许对象缓存,这是 WordPress 引入的内部缓存系统,用于将数据库中的数据存储在PHP 内存中。这通过减少数据库调用次数来提高数据库效率并减少 PHP 执行时间。这意味着 HHVM 一直非常适合包含大量不可存储内容的动态站点。 但是,话虽这么说,不幸的是,就 WordPress 和 PHP 而言,HHVM 已经走到了尽头。我们将在下面找出原因。 HHVM 不再是 WordPress 的可行解决方案 以下只是 HHVM 对于 WordPress 和 Kinsta 客户来说不再是一项好技术的众多原因中的几个。
首先,HHVM从 v3.30 版本开始终止了对 PHP 的支持。 其次,需要指出的是,HHVM实际上从未得到 WordPress 的正式支持。感谢 WordPress 核心团队中一些痴迷于速度的成员(#27881),它得以兼容。一些 WordPress 托管提供商(例如 Kinsta)已将其提供给客户(我们于 2016 年推出),以便他们能够利用性能提升。 WordPress 实际上从 2017 年 5 月(几年前)起就停止将 HHVM 纳入其核心测试基础设施中。WordPress 核心开发人员 John Blackbourn 说道: 如果您在 HHVM 上运行 WordPress 网站,您应该考虑迁移到 PHP 7+,它受到更多支持和测试,并提供 HHVM 带来的所有内存和性能优势。 由于 HHVM 不再由 WordPress 核心团队成员进行测试,错误和兼容性问题开始出现。其中许多都是我们亲眼所见的(#8194)。大约一年前,随着最新版本的 HHVM 的出现,一开始的一些故障已经变成了源源不断的故障,现在正在影响流行的第三方 WordPress 主题和插件的功能。因此,HHVM 不再是WordPress 网站的稳定或合适的解决方案。 除了支持 HHVM 托管之外,我们的 PHP 与 HHVM 基准测试表明PHP 7.2 实际上比 HHVM 更快。PHP 有史以来第一次在所有测试中获胜,其中包括独立 WordPress 网站、WooCommerce 和 Easy Digital Downloads。基准(PHP 与 HHVM) WordPress 基准(PHP 与 HHVM) PHP 7.3 和 7.4甚至更快。