wordpress配置
WordPress 3.7 introduced automatic upgrades. Maintenance and security updates are applied in the background when a patch becomes available and someone visits your site. By default, the process only applies when updating minor versions — such as 3.7.0 to 3.7.1 — and takes no longer than 25 seconds. The development team tested more than 111 thousand sites without a failure. You shouldn’t experience any problems.
WordPress 3.7引入了自动升级 。 当补丁可用且有人访问您的站点时,将在后台应用维护和安全更新。 默认情况下,该过程仅在将次要版本(例如3.7.0到3.7.1)更新时适用,并且所用时间不超过25秒。 开发团队成功测试了超过111,000个站点。 您应该不会遇到任何问题。
That said, we developers work in binary. Things either work or they don’t; we’ll translate the phrase “shouldn’t fail” to “will inevitably fail at some point”. Automated updates are especially risky if you:
也就是说,我们的开发人员使用二进制文件。 事情要么起作用,要么不起作用; 我们将“不应失败”一词翻译为“在某些时候不可避免地会失败” 。 如果您执行以下操作,则自动更新的风险尤其大:
- use a large number of dubious plug-ins or complex third-party themes 使用大量可疑的插件或复杂的第三方主题
- want to control and manage updates yourself, or 想要自己控制和管理更新,或者
- have an especially nervous disposition! 有一个特别紧张的倾向!
您的网站会出现问题吗? (Will Your Site Be Problematic?)
File permissions, network connectivity and other issues can cause updates to fail. If you have concerns, install the Background Update Tester plug-in to help you spot the most obvious problems. After enabling, visit the Update Tester screen from the dashboard.
文件权限,网络连接和其他问题可能导致更新失败。 如果有问题,请安装Background Update Tester插件以帮助您发现最明显的问题。 启用后,从仪表板访问Update Tester屏幕。
禁用自动更新 (Disable Automatic Updates)
The WordPress team discourages disabling updates but there are a couple of options should you wish to disobey:
WordPress团队不鼓励禁用更新,但是您有两个选择可以不服从:
- Use version control. If WordPress detects Subversion, Git, Mercurial or Bazaar files in the installation folder, plugins folder or any parent folder, it will disable automatic updates. 使用版本控制。 如果WordPress在安装文件夹,plugins文件夹或任何父文件夹中检测到Subversion,Git,Mercurial或Bazaar文件,它将禁用自动更新。
Alternatively, add the following line to your
wp-config.php
file in the WordPress root folder:或者,将以下行添加到WordPress根文件夹中的
wp-config.php
文件中:define( 'WP_AUTO_UPDATE_CORE', false );
仅启用自动次要更新 (Enable Automated Minor Updates Only)
Automated minor update installation is the default option so you shouldn’t need to do anything. However, if you’ve implemented something clever or unusual, you can explicitly set WP_AUTO_UPDATE_CORE in your wp-config.php
file:
自动化的次要更新安装是默认选项,因此您无需执行任何操作。 但是,如果您实施了一些聪明或不寻常的操作,则可以在wp-config.php
文件中显式设置WP_AUTO_UPDATE_CORE:
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
启用所有更新 (Enable All Updates)
Do you laugh in the face of danger and tickle the feet of fear? You can enable major and minor automated updates with:
您在危险面前笑并在恐惧的脚上挠痒吗? 您可以通过以下方式启用主要和次要自动更新:
define( 'WP_AUTO_UPDATE_CORE', true );
You’ll never need to hit that ‘Upgrade Now’ button again. That’s assuming everything went well and you still have a working dashboard to log in to!
您再也不需要再次点击“立即升级”按钮。 假设一切正常,您仍然可以使用工作仪表板登录!
翻译自: https://www.sitepoint.com/configure-automatic-updates-wordpress/
wordpress配置