# Prevent Updates for Selected Plugins

> Stops update checks and auto-updates for the plugins you list, for example a plugin you patched by hand or must keep on a tested version.

- Type: PHP
- Runs: Run everywhere
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: plugins, updates, maintenance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/dev-disable-plugin-updates-list/

## Code

```php
$wpide_frozen_plugins = array( 'example-plugin/example-plugin.php' ); // Plugins to freeze.

add_filter( 'site_transient_update_plugins', function ( $value ) use ( $wpide_frozen_plugins ) {
    if ( is_object( $value ) && isset( $value->response ) ) {
        foreach ( $wpide_frozen_plugins as $plugin ) {
            if ( isset( $value->response[ $plugin ] ) ) {
                $value->no_update[ $plugin ] = $value->response[ $plugin ];
                unset( $value->response[ $plugin ] );
            }
        }
    }

    return $value;
} );

add_filter( 'auto_update_plugin', function ( $update, $item ) use ( $wpide_frozen_plugins ) {
    return isset( $item->plugin ) && in_array( $item->plugin, $wpide_frozen_plugins, true ) ? false : $update;
}, 10, 2 );
```

## Notes

List plugin paths as folder/main-file.php (see the Plugins screen). Remember to update them manually when you are ready.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Prevent Updates for Selected Plugins" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
