WordPress – how to disable comments and pingbacks on multi-sites

To disable comments and pingbacks on WordPress multi-site installs – you need to use the following code in a must-use plugin.

Please note – existing comments may still be displayed, depending on how your theme is configured. You may need to delete existing comments or completely remove the comments section from the theme.

add_filter( 'pings_open', '__return_false', 10, 2 );
add_filter( 'comments_open', '__return_false', 10, 2 );

If you’re not sure how to create a must-use plugin, see WordPress – how to create a must-use plugin (mu-plugins).

Was this article helpful?

Related Articles