How to turn off automatic updates in WordPress?

How to turn off automatic updates in WordPress?

Bloggers using WordPress may have installed many plugins, and plugin updates are also very frequent.

Sometimes we have made some changes to the plug-in to suit our needs, and the changed plug-ins have fully met the needs.

Sometimes the new version of the plugin only adds some language packs or only minor modifications, so we do n’t want to update these plugins.

However, WordPress always prompts that the plugin has been updated. What if you want to remove these prompts?

Here is the easy way:

Turn off automatic updates:

Method one:

Edit the wp-config.php file and add the following content

/ ** Turn off WordPress automatic update and upgrade * /

define ('AUTOMATIC_UPDATER_DISABLED', true);

Method two add a hook in the theme functions.php

add_filter ('automatic_updater_disabled', '__return_true');

Close the update prompt:

Add the following code in the theme's functions.php:

// disable update

add_filter ('pre_site_transient_update_core', create_function ('$ a', "return null;")); // Close the core prompt

add_filter ('pre_site_transient_update_plugins', create_function ('$ a', "return null;")); // close the plugin prompt

add_filter ('pre_site_transient_update_themes', create_function ('$ a', "return null;")); // close the theme prompt

remove_action ('admin_init', '_maybe_update_core'); // Disable WordPress from checking for updates

remove_action ('admin_init', '_maybe_update_plugins'); // Disable WordPress from updating plugins

remove_action ('admin_init', '_maybe_update_themes'); // Prevent WordPress from updating the theme

Daily Recap
Subscribe to Daily Recap to get updates on what's happening in China's EV industry each day.
Daily Recap
View more channels