默认情况下,WordPress 提供 WordPress 核心次要版本的自动更新,但不包含插件和主题。要让它们也自动更新,你应该手动启用此选项,或使用我们的 Automatic WordPress Updates(WordPress 自动更新) 解决方案。

在自动更新之前会进行自动备份,以便你可以随时恢复到之前的版本。

启用 WordPress 自动更新

网站(Websites) 分区,找到相关的 WordPress 网站并点击 Dashboard(仪表盘)。然后,搜索 WordPressSecurity(安全) 并打开它。

WordPress auto-updates(WordPress 自动更新) 分区,点击 Smart auto-updates(智能自动更新)

请阅读免责声明以了解自动更新的好处和风险,然后点击 Save(保存) 确认。

在 hPanel 中启用 WordPress 自动更新时,原生的 WordPress 自动更新将被禁用。

高级设置

WordPress menu with Security option highlighted beneath the WordPress section
WordPress menu with Security option highlighted beneath the WordPress section
Smart auto-updates option selected, recommended for WordPress core, themes, and plugins
Smart auto-updates option selected, recommended for WordPress core, themes, and plugins

点击 Customize(自定义) 以区分 WordPress 核心、插件和主题的逻辑。

对于 WordPress 核心(core),可用选项为:

  • Don't update(不更新):启用此选项将禁用自动更新。
  • Yes, but only security updates(是,但仅安全更新):这只会应用次要版本更新(即从 6.2.1 到 6.2.2)。
  • Yes, enable all updates(是,启用所有更新):这将应用主要和次要更新(即从 6.2.1 到 6.3)。

同理,对于 主题(themes)插件(plugins),可用选项为:

  • Don't update(不更新):启用此选项将禁用自动更新。
  • Yes, but only security updates(是,但仅安全更新):这将应用修复已知漏洞的更新(基于 Patchstack 漏洞数据库)。
  • Yes, enable all updates(是,启用所有更新):这将应用所有更新。

故障排查

如果遇到任何问题,建议在 hPanelWordPressSecurity(安全) 中禁用 WordPress 自动更新。

如果你的网站因自动更新而崩溃,请 恢复备份

其他资源(Additional resources)

  • 如何更新 WordPress:四种快速简单的方法

来源:Hostinger 官方帮助文档