Top.Mail.Ru

How to Disable Updates for Specific WordPress Plugins

Are you tired of constant updates for certain WordPress plugins that don’t significantly impact your website’s performance? In this article, we’ll explore multiple methods to stop updates for specific plugins without affecting your entire WordPress update process.

The Importance of Plugin Updates
Before diving into how to disable updates for specific WordPress plugins, it’s crucial to understand the significance of keeping your plugins up to date. Plugins are essential for adding new features and functionalities to your website, enhancing its overall performance, security, and functionality.

However, there are instances where you may want to disable updates for a specific plugin. Perhaps it’s due to language localization issues or a plugin that doesn’t play a critical role in your site’s functionality. In such cases, you can utilize the following methods to control updates for specific plugins while keeping your WordPress core and other essential plugins up to date.

Reasons to Disable Plugin Updates
Let’s start by exploring some common scenarios that might lead you to disable updates for a specific plugin. For instance, if you’re using a plugin like “Page Restrict” to limit access to certain pages for registered users, and you’ve taken the time to translate it into your preferred language, only to find that updates reset the language settings, you might want to disable updates for that particular plugin.

Method 1: Disabling Updates with Plugins
The most straightforward way to disable updates for a specific plugin is by using dedicated plugins designed for this purpose. While this method is simple and doesn’t require extensive technical knowledge, it may introduce some conflicts. One popular plugin for this purpose is “Easy Updates Manager.”

1. Install and activate the “Easy Updates Manager” plugin.
2. Navigate to the Console → Update Options in your WordPress admin menu.
3. In the “Plugins” tab, you can easily select which plugins to exclude from updates, both manually and automatically.

Method 2: Modifying Plugin Version in the File
If you prefer a more hands-on approach, you can manually adjust the version of the plugin in its main file to prevent updates. Here’s how:

1. Access your website’s file manager and locate the main file of the plugin.
2. The main file typically shares a name with the plugin, followed by the “.php” extension.
3. In the file, look for the version information.
4. Increase the version number to a value higher than any future updates. This will effectively prevent the plugin from updating until a version with a higher number is released.

Method 3: Inserting Code in the Plugin’s Main File
This method is preferred by those who want to minimize changes to their site’s theme files and ensure a cleaner transition if the plugin is removed. Here’s how to disable updates using code:

1. Locate the following code:

“`php
add_filter(‘site_transient_update_plugins’, function($value) {
if (!is_object($value)) return $value;

// Remove the current plugin from the update list
unset($value->response[plugin_basename(__FILE)]);

return $value;
});
“`

2. Copy the code and paste it into the main file of the plugin. The main file can be found in your file manager at “wp-content → plugins → plugin-name → main-file.php.”

Method 4: Inserting Code in the Theme’s functions.php File
This method is less recommended because it involves making changes to your theme’s code, which can lead to complications. However, it’s still a valid approach:

1. Modify the code below by specifying the correct path to the plugin’s main file (highlighted in red).

“`php
add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ );
function filter_plugin_updates( $value ) {
unset( $value->response[‘plugin-folder/main-file.php’] ); // Replace with your plugin’s folder and main file.
return $value;
}
“`

2. Copy and paste this code into your theme’s functions.php file, which can be found in your file manager at “wp-content → themes → your-theme → functions.php.”

Conclusion
While it’s essential to keep your WordPress site up to date, there may be specific plugins where constant updates are unnecessary. By following these methods, you can disable updates for selected plugins, ensuring your site’s stability and functionality while avoiding language or compatibility issues with non-essential plugins. Choose the method that best suits your needs and skill level to maintain a smooth and efficient website management process.