wppack / disable-comments-plugin
Completely disable comments: closes discussion everywhere, hides existing comments, and removes every comment surface from wp-admin, feeds, REST and XML-RPC.
Package info
github.com/wppack-io/disable-comments-plugin
Type:wordpress-plugin
pkg:composer/wppack/disable-comments-plugin
1.0.0
2026-07-13 16:18 UTC
Requires
- php: ^8.2
- composer/installers: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.68
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
- roots/wordpress-core-installer: ^3.0
- roots/wordpress-full: >=6.7 <8.0
- szepeviktor/phpstan-wordpress: ^2.0
- wp-cli/config-command: ^2.3
- wp-cli/core-command: ^2.1
- wp-cli/db-command: ^2.1
- wp-cli/entity-command: ^2.8
- wp-cli/extension-command: ^2.1
- wp-cli/i18n-command: ^2.7
- wp-cli/language-command: ^2.0
- wp-cli/server-command: ^2.0
- wp-cli/wp-cli: ^2.12
- wp-phpunit/wp-phpunit: >=6.7 <8.0
- wp-theme/twentytwentyfive: *
- wpnx-io/wp-translations: *
- yoast/phpunit-polyfills: ^4.0
README
Completely disable comments in WordPress. Activate it and the comment system is gone; deactivate it and everything comes back. No settings screen, no options in the database.
What it does
Discussion
- Closes comments and pingbacks on every post type, at a priority no theme or plugin can override.
- Existing comments never render: templates receive an empty thread and a zero count, so themes show neither comment lists nor "N Comments" links.
- Comment queries for discussion types short-circuit before reaching the
database — the Latest Comments block, the classic Recent Comments widget
and direct
WP_Comment_Querycalls all come back empty.
wp-admin
- Removes the Comments menu, Settings › Discussion, the toolbar comments bubble and the classic Recent Comments widget; the dashboard's "At a Glance" and Activity widgets show no comments. Comment and trackback support is dropped from every post type, which also removes the Discussion metaboxes, the block editor's discussion panel and the comment columns on list tables.
- Direct hits on
edit-comments.php,comment.phporoptions-discussion.phpbounce to the dashboard.
Feeds and machine surfaces
- Comment feed URLs return 404 and their
<link>tags disappear from the document head. - The
X-Pingbackheader, RSD link and pingback URL are gone; the/wp/v2/commentsREST routes and every comment/pingback XML-RPC method are unregistered, and post/page REST responses stop advertising areplieslink.
What it deliberately leaves alone
- Existing comments stay in the database. Nothing is deleted or rewritten; deactivating the plugin restores them exactly as they were.
- Non-discussion comment types keep working. Plugins that store their own records as comments (WooCommerce order notes, action logs, …) query them by their own type and pass through untouched.
Requirements
PHP 8.2+, WordPress 6.7+.
License
MIT
