# Permanently Switch Off Chosen Jetpack Modules

> Removes Jetpack modules you never want used, such as Likes, Comments or Stats, from the list of available modules, so nobody can turn them on by accident.

- Type: PHP
- Runs: Run everywhere
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: jetpack, modules, performance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/jetpack-disable-modules/

## Code

```php
$wpide_disabled = array( 'likes', 'comments' ); // Module slugs to remove.

add_filter( 'jetpack_get_available_modules', function ( $modules ) use ( $wpide_disabled ) {
    foreach ( $wpide_disabled as $slug ) {
        unset( $modules[ $slug ] );
    }

    return $modules;
}, 20 );
```

## Notes

Use Jetpack module slugs (likes, comments, stats, sharedaddy, related-posts, infinite-scroll, photon...). Already active modules stop loading.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Permanently Switch Off Chosen Jetpack Modules" 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/
