aeeble

account_circleログイン

Disable Specific WordPress Plugin Updates

2025-09-19

WordPress users often face the dilemma of wanting to disable update checks for specific plugins while keeping others up-to-date. This is particularly useful when a plugin update breaks functionality or when a user has made custom modifications to a plugin. A simple PHP code snippet can be added to a theme's functions.php file to achieve this.

How It Works

The code snippet hooks into WordPress's site_transient_update_plugins filter, allowing it to modify the update check response. By unsetting the response for specific plugins, WordPress is tricked into thinking there are no updates available for those plugins.

Usage

  1. Identify the plugins you want to exclude from update checks by noting their folder and file names (e.g., plugin-folder/plugin.php).
  2. Add the provided PHP code to your theme's functions.php file.
  3. Modify the $pluginsToDisable array in the code to include the plugins you've identified.

Benefits

  • Allows for granular control over plugin updates.
  • Prevents unwanted updates that might break site functionality.
  • Does not require installing additional plugins.

By implementing this code snippet, WordPress users can maintain control over their plugin updates, ensuring that custom modifications are preserved and potential update-related issues are mitigated.

画像
評価
関連リスト
コメント