wordpress自动草稿_如何在WordPress中禁用自动更新

wordpress自动草稿

Did you know that WordPress can automatically update your website? In some cases, that can include plugins and themes too.

您知道WordPress可以自动更新您的网站吗? 在某些情况下,它也可以包括插件和主题。

Despite the security benefits, there is a slight chance that these background updates can break your website.

尽管具有安全性优点,这些后台更新还是有可能破坏您的网站。

In this article, we will show you how to disable automatic updates in WordPress, so you can manually update on your own.

在本文中,我们将向您展示如何在WordPress中禁用自动更新,以便您可以自行进行手动更新。

Disabling automatic updates in WordPress
为什么WordPress自动更新 (Why WordPress Updates Automatically)

WordPress automatically updates the core WordPress software for security reasons.

出于安全原因,WordPress自动更新核心WordPress软件。

Sometimes, it may also update a plugin or theme to fix a potential threat. For instance, a WordPress plugin or theme might be updated to remove a critical vulnerability. If that plugin or theme is used by a lot of websites, WordPress core team may push out an automatic update for that.

有时,它可能还会更新插件或主题以修复潜在威胁。 例如,可以更新WordPress插件或主题以消除严重漏洞。 如果许多网站都使用该插件或主题,则WordPress核心团队可能会为此推送自动更新。

Apart from those situations, WordPress lets you decide when you want to install updates.

除了这些情况之外,WordPress还可以让您决定何时安装更新。

We don’t recommend turning off automatic WordPress updates. They’re an important security feature.

我们不建议您关闭自动WordPress更新。 它们是重要的安全功能。

However, in some rare situations, updates can break your website or affect its functionality. This could lead to you losing business and customers.

但是,在极少数情况下,更新可能会破坏您的网站或影响其功能。 这可能会导致您失去业务和客户。

If you’re confident that you can manage manual updates yourself, then you can safely disable automatic updates in WordPress.

如果您确定自己可以管理手动更新,则可以安全地在WordPress中禁用自动更新。

影片教学 (Video Tutorial)

演示地址

If you’d prefer written instructions, just keep reading.

如果您喜欢书面说明,请继续阅读。

配置和禁用自动WordPress更新 (Configuring and Disabling Automatic WordPress Updates)

The easiest way to do this is by installing and activating the Easy Updates Manager plugin. If you’re not sure how to do that, take a look at our step by step guide on how to install a WordPress plugin.

最简单的方法是安装并激活Easy Updates Manager插件 。 如果您不确定该怎么做,请查看有关如何安装WordPress插件的分步指南。

Once the plugin is activated, go to Dashboard » Updates Options to configure your settings.

激活插件后,转到“ 仪表板”»“更新选项”以配置设置。

Configuring the settings for the Easy Updates Manager plugin

You can choose to ‘Disable all updates’, but we don’t recommend this option. Primarily because it’ll prevent all update notifications from appearing.

您可以选择“禁用所有更新”,但是我们不建议您使用此选项。 主要是因为它将阻止所有更新通知的出现。

Instead, you should pick the settings you want. You could disable plugin and theme auto-updates, but leave the standard core WordPress auto-updates enabled.

相反,您应该选择所需的设置。 您可以禁用插件和主题自动更新,但是保留标准核心WordPress自动更新启用。

Disabling automatic plugin and theme updates while leaving minor core auto updates enabled

Note: If you choose ‘Disable plugin updates’ and ‘Disable theme updates’ instead of ‘Disable auto updates’, then you won’t even see the update notifications in your plugins and themes lists.

注意:如果您选择“禁用插件更新”和“禁用主题更新”而不是“禁用自动更新”,那么您甚至不会在插件和主题列表中看到更新通知。

Easy Updates Manager keeps a log of what’s updated, so if anything does break on your site, you can rollback to a previous working version. To view this, go to Dashboard » Updates Options and then click the ‘Logs’ tab.

Easy Updates Manager会保留更新的日志,因此,如果您的站点上发生任何故障,您可以回滚到以前的工作版本。 要查看此信息,请转到“ 仪表板”»“更新选项” ,然后单击“日志”选项卡。

The logs tab of the Easy Updates Manager plugin

There’s also a premium version of Easy Updates Manager, which offers a lot of extra options. For instance, it integrates with UpdraftPlus so that you can automatically run a backup of your site before updates are applied.

还有一个高级版本的Easy Updates Manager,它提供了许多其他选项。 例如,它与UpdraftPlus集成在一起,因此您可以在应用更新之前自动运行站点的备份。

在不使用插件的情况下禁用自动WordPress更新 (Disabling Automatic WordPress Updates Without Using a Plugin)

What if you don’t want to use a plugin? You can disable automatic updates in WordPress by adding this line of code in your wp-config.php file:

如果您不想使用插件怎么办? 您可以通过在wp-config.php文件中添加以下代码行来禁用WordPress中的自动更新:

define( 'WP_AUTO_UPDATE_CORE', false );

This will disable all automatic WordPress updates.

这将禁用所有自动WordPress更新。

Important: Make sure you read our article on how to safely edit the wp-config.php file in WordPress with step by step instructions.

重要提示:请确保您已阅读有关如何按照分步说明安全地在WordPress中编辑wp-config.php文件的文章。

If you want to receive minor core updates, but disable theme and plugin updates, you can do so by adding the following filters in your theme’s functions.php file or in a site-specific plugin.

如果您想接收次要的核心更新,但禁用主题和插件更新,则可以通过在主题的functions.php文件或特定站点的插件中添加以下过滤器来实现。

Disable automatic WordPress plugin updates:

禁用自动WordPress插件更新:

add_filter( 'auto_update_plugin', '__return_false' );

Disable automatic WordPress theme updates:

禁用自动WordPress主题更新:

add_filter( 'auto_update_theme', '__return_false' );
WordPress自动更新的利弊 (Pros and Cons of Automatic WordPress Updates)

Now you know how to disable automatic updates, but should you disable them? There’s no right answer and this depends on you and your website.

现在您知道了如何禁用自动更新,但是应该禁用它们吗? 没有正确的答案,这取决于您和您的网站。

On our sites, we’ve disabled automatic plugin and theme updates while keeping the minor core updates enabled.

在我们的网站上,我们已禁用自动插件和主题更新,同时保持次要核心更新处于启用状态。

Let’s take a look at the advantages and disadvantages of automatic updates. That way, you can decide whether to disable auto-updates on your site.

让我们看一下自动更新的优点和缺点。 这样,您可以决定是否在站点上禁用自动更新。

Advantages of Automatic Updates in WordPress

WordPress中自动更新的优点

Automatic updates are great for WordPress security. Many users forget to update their plugins or their core WordPress installation.

自动更新对于WordPress安全性非常有用 。 许多用户忘记更新其插件或核心WordPress安装。

With automatic WordPress updates enabled, you don’t have to worry about updating your site whenever a minor update to WordPress is released. These are pushed out for maintenance and security purposes.

启用自动WordPress更新后,您无需担心会在发布WordPress的次要更新时更新您的网站。 这些是出于维护和安全目的推出的。

In the past, automatic updates were something you only got by paying for managed WordPress hosting. Now, they’re available for everyone (at least for minor releases).

过去,只有通过为托管WordPress托管付费才能获得自动更新。 现在,每个人都可以使用它们(至少对于次要版本而言)。

You also know that if there’s a crucial security issue with WordPress or a popular plugin, then WordPress will automatically update. Even if you’re busy or away from home, your site will stay secure.

您还知道,如果WordPress或流行的插件存在关键的安全问题,那么WordPress将自动更新。 即使您忙碌或出门在外,您的网站也将保持安全。

If you have a lot of sites, then automatic updates can save you quite a bit of time. And even if you only have one site, you might prefer the peace of mind of knowing that WordPress is taking care of things.

如果您有很多站点,那么自动更新可以为您节省大量时间。 而且,即使您只有一个站点,您也可能宁可放心知道WordPress正在处理问题。

Disadvantages of Automatic Updates in WordPress

WordPress中自动更新的缺点

The core WordPress team responsible for releasing updates, makes sure that it goes without a hiccup.

负责发布更新的WordPress核心团队确保其不会打h。

However, there is a slight chance that automatic updates can break your site. In our experience, the minor releases haven’t broken any of our sites yet.

但是,自动更新可能会破坏您的网站。 根据我们的经验,次要发行版尚未破坏我们的任何网站。

That’s because we are following the best practices and not modifying any core files. If you modify WordPress core files, then these automatic updates can override them.

这是因为我们正在遵循最佳做法,而不修改任何核心文件。 如果您修改WordPress核心文件,则这些自动更新可以覆盖它们。

If WordPress ever felt it necessary to push out a security update for a theme you are using, there is a chance that it will break your website. This particularly applies if you have modified your theme files.

如果WordPress认为有必要针对您正在使用的主题推出安全更新,则有可能破坏您的网站。 如果您修改了主题文件,则尤其适用。

Automatic plugin updates can potentially break your site as well. There are just too many variables, such as different server environments and plugin combinations.

自动插件更新也有可能破坏您的网站。 变量太多,例如不同的服务器环境和插件组合。

Now it’s important to know that these updates will not break the vast majority of websites. Even so, you may feel you don’t want to take the risk.

现在,重要的是要知道这些更新不会破坏绝大多数网站。 即使这样,您仍可能会觉得自己不想冒险。

Another drawback is that you won’t always automatically get a notification when your site is updated.

另一个缺点是,您的网站更新时,您不会总是自动收到通知。

我应该禁用自动WordPress更新吗? (Should I Disable Automatic WordPress Updates?)

Basically, it is up to you to make this decision.

基本上,由您自己决定。

For most beginners and vast majority of WordPress websites, automatic updates are harmless, and you should not disable them.

对于大多数初学者和绝大多数WordPress网站而言 ,自动更新是无害的,您不应禁用它们。

However, if you run an online store or don’t want to lose business due to a broken site, then you can safely turn off automatic updates.

但是,如果您经营在线商店或不想因站点损坏而失去业务,则可以安全地关闭自动更新。

Still, make sure that you manually install those updates in a timely manner to ensure your website’s security.

不过,请确保您及时手动安装这些更新,以确保网站的安全。

We hope this article helped you learn how to disable automatic updates in WordPress.

我们希望本文能帮助您学习如何在WordPress中禁用自动更新。

Whether you’re using automatic or manual updates, it’s crucial to make sure you have regular backups of your site. Take a look at our comparison of the best WordPress backup plugins and our guide on how to restore your WordPress site from a backup.

无论您使用的是自动更新还是手动更新,确保您有定期的站点备份都是至关重要的。 看看我们对最佳WordPress备份插件的比较,以及有关如何从备份还原WordPress网站的指南。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-disable-automatic-updates-in-wordpress/

wordpress自动草稿

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值