Introduction
In a production website, it is sometimes required that you disable WordPress automatic updates.
But – In my opinion, I would rather have a broken secure site rather than an insecure out of date site. So be careful and manually update your site at a regular interval. Read on to learn how to prevent auto updates in WordPress.
Disable auto updates in wp-config.php
Open the wp-config.php
file either in your favorite editor or via your hosting control panel file browser.
Add the following line to wp-config.php
define( 'WP_AUTO_UPDATE_CORE', false );
Save the file and you have turned off automatic updates.
You can check the status of this by going to ‘Updates’ in the WordPress dashboard.
Opening WordPress site health will also show the following:
You will also lose the ability to enable automatic updates. But that’s not the only way to stop automatic updates;
Disable automatic updates in functions.php or add to your own plugin
You can also prevent auto updates by adding the following filter into your child theme functions.php
or add to your own plugin.
add_filter( 'automatic_updater_disabled', '__return_true' );
Conclusion
So – yes you can easily turn off automatic updates in WordPress. But the downside is that you risk your site being insecure. Use these methods with caution as there are security issues found all the time.
prevent one plugin from updating
prevent a theme from updating