By default, WordPress automatically checks for plugin updates and notifies administrators when new versions are available. While updates are important for security and performance, developers may want to disable them to preserve custom code modifications. On ruachost.com, you can disable plugin updates using a simple PHP function.
Why Disable Plugin Updates?
-
Prevents overwriting custom code changes.
-
Ensures stability in production environments.
-
Avoids unexpected compatibility issues with themes or other plugins.
-
Gives developers full control over update timing.
Steps to Disable Plugin Updates
-
Log in to WordPress with an administrator account.
-
In the dashboard, go to Appearance → Theme Editor.
-
Select your active theme and open the functions.php file.
-
Add the following code snippet at the end of the file:
// Disable WordPress plugin updates remove_action('load-update-core.php', 'wp_update_plugins'); add_filter('pre_site_transient_update_plugins', function($a) { return null; }); -
Click Update File to save changes.
-
Refresh your WordPress dashboard → Plugin update notifications will no longer appear.
Important Notes
-
Always back up your site before editing theme files.
-
Use a child theme to preserve changes during theme updates.
-
Disabling updates may expose your site to security risks apply updates manually when needed.
-
Consider using a staging environment to test updates before applying them to production.