10
Disabling comments in WordPress is a pragmatic solution for stopping unwanted discussions and regaining control of your site. Whether it’s spam, saving time, or clear content without distractions, the right method depends on your goals.
Disable WordPress comments: step-by-step instructions
There are a number of ways to disable comments in WordPress, from simple settings to technical interventions. Choose the method that suits your purpose – here are all the options in detail:
- Global deactivation via the dashboard: Open the WordPress backend and click on Settings ☻ Discussion. Uncheck the box next to “Allow visitors to comment on new posts”. Confirm by clicking Save Changes. This setting blocks new comments for all future posts and pages. Note: Posts that have already been published remain unaffected.
- Customize individual posts: Open an already published post or page in the editor. Click on Discussion in the Document tab on the right and uncheck Allow Comments. Save the changes. Tip: Use the quick edit function in the post list (under Posts ☻ All Posts) to edit multiple posts at the same time. Hold down Ctrl/Cmd to select multiple entries, click on Quick Edit and disable the comment function for all selected posts.
- Plugins for precise control: Install the Disable Comments plugin in Wordpress. After activation, you will find options for disabling comments for certain post types (posts, pages, media) or the entire website under Settings ☻ Disable Comments. The plugin also removes all comment widgets and fields from the frontend.
Disable WordPress comments: Mastering hidden pitfalls
Even after comments have been disabled, sometimes remnants remain – from database entries to hidden settings. This is how you close all gaps.
- Forgot media comments?: WordPress allows comments under images and PDFs by default. Delete this option by adding this code to functions.php: php Copy function deactivate_media_comments() { remove_post_type_support(‘attachment’, ‘comments’); } add_action(‘init’, ‘deactivate_media_comments’); Or use Disable Comments and select the post type Media under Settings.
- Clean up the database: Old comments create data clutter. Install WP-Sweep to delete orphaned entries in the wp_comments and wp_commentmeta tables. Alternatively, run this SQL query in phpMyAdmin (backup first!): sql Copy TRUNCATE TABLE wp_comments; TRUNCATE TABLE wp_commentmeta;
- Multisite environments: If you operate a WordPress network, repeat the deactivation for each subsite individually. With plugins like Disable Comments Multisite, you can automate this process.
- Survive theme updates: Use a child theme to protect code changes in the functions.php. Plugins like Child Theme Wizard generate a child theme in two clicks – without FTP access.
- Don’t forget backups: Before making any code changes, back up your website first. UpdraftPlus automates backups and stores them on Google Drive, Dropbox or by email. Once set up, you’ll save yourself trouble in case of errors.
- Pause comments only: If you want to reactivate the option later, go to Settings ☻ Discussion and set the option “Before a comment appears, the author must have already written an approved comment”. This way, new comments will be sent to the trash without completely deleting the function.