How to Disable Comments in WordPress Without a Plugin (and an Easier Way)

Disable WordPress comments in three ways: config file, admin settings, or database query. Learn why and discover a faster approach.

The Quick Answer

Disable comments in WordPress by adding this single line to your wp-config.php file:

define( "COMMENTS_ENABLED", false );

Restart WordPress and all comment forms vanish. But if you need more control, read on for three methods that range from simple to complete. Each approach has tradeoffs between simplicity, reversibility, and granularity of control.

Why Disable Comments on Your Site

Comment sections can be a liability for modern WordPress sites. Comment spam clogs moderation queues, fake reviews damage credibility, and maintaining active discussion threads requires constant attention. For sites focused on publishing content rather than community engagement, disabling comments reduces administrative overhead by 30 to 50 percent. It also eliminates security vectors: every comment form is a potential entry point for malicious scripts and SQL injection attempts. Even with anti-spam plugins like Akismet enabled, you still spend time managing false positives and reviewing flagged comments. For business sites, product pages, and documentation, comment sections often add little value and create noise that distracts from the core content mission.

Method 1: Disable Comments via wp-config.php

This is the cleanest approach for a site-wide ban. Edit your wp-config.php (found in your WordPress root directory) and add the define above before the line that says /* Thats all, stop editing! */.

Reload any page and comment forms disappear immediately. Comments already posted stay in the database, but visitors cannot add new ones. This method works across all post types: posts, pages, custom post types, and everything else. It takes precedence over individual post settings and the Discussion settings screen, making it the most forceful option.

The advantage is simplicity and completeness. One line disables comments site-wide. You can still view historical comments in the admin if needed, but they never appear on the front end. If you later want to re-enable comments, simply remove the define from wp-config.php and reload.

Method 2: Turn Off Comments in the Admin Dashboard

If you prefer the UI without touching code:

  1. Go to Settings > Discussion.
  2. Uncheck the box labeled Allow people to post comments on new articles.
  3. Scroll down to Default article settings and uncheck Allow comments on new posts and Allow comments on new pages.
  4. Click Save Changes.

This method disables comments on future posts only. To turn off comments on existing posts, you need to close them individually or use a bulk edit tool. The dashboard method gives you granular control: you can allow comments on certain posts while blocking them on others. This is useful for blogs where you want comments on articles but not on archive or documentation pages.

Navigate to the posts list and bulk-select posts you want to modify. Use the bulk actions dropdown to access comment settings for multiple posts at once. Be aware that this approach requires repetitive clicking if you have hundreds of posts.

Method 3: Close Comments Across All Posts (Database Query)

To disable comments on every existing post at once, access phpMyAdmin or your database tool and run this SQL query:

UPDATE wp_posts SET comment_status = "closed";

Replace wp_posts with your actual table prefix if it differs (some sites use wp_abc_posts for multi-site setups). All posts will have comments locked, but the comments themselves remain in the database. If you later want to re-enable comments on a specific post, you can update that individual post and set its comment_status back to “open”.

This method is powerful but requires database access and familiarity with SQL. Use it when you want to disable comments on all existing content but still allow the Discussion settings screen to control future behavior. It works well alongside Method 2 if you want existing posts locked but new posts to allow comments by default.

Why This Matters

Comment spam, fake reviews, and admin notification overload are real problems. Spam comments waste time and distract from genuine audience interaction. WordPress spam databases grow by millions of entries daily. Even with filters, you spend hours reviewing false positives. Disabling comments cuts overhead and lets you focus your dashboard on what matters: content and visitors. In practice, comment sections on publishing sites receive less than 5 percent meaningful engagement. Removing them declutters the interface and improves perceived professionalism.

The Easier Approach

If you manage multiple sites or want granular control without editing config files, ReadyGo Toolkit (free) includes a toggle to disable comments site-wide and selectively bulk-close posts in seconds. No coding needed. The plugin also lets you disable comments by post type: disable on pages but keep on posts, for example. You can review and restore old comments from a single admin screen without diving into phpMyAdmin.

Backup Before You Disable

Before making changes, export your comment data in case you need to refer back to historical feedback. Go to Tools > Export and select comments. This creates an XML file you can archive. Even though disabling comments does not delete them, having a backup gives you peace of mind if you accidentally truncate the comments table or decide to completely remove all comments later.

Frequently Asked Questions

Will existing comments be deleted?

No. Disabling comments hides the form but leaves all posted comments in the database. You can re-enable comments anytime and they return. To permanently delete comments, you need to use phpMyAdmin or a database cleanup plugin.

Can I disable comments on only certain post types?

Yes. Instead of the config define, go to Settings > Discussion and toggle the checkboxes for specific post types like posts, pages, or attachments. This is the most granular approach and does not require code or database access.

How do I re-enable comments later?

Reverse the change: remove the define from wp-config.php, re-check the box in Settings > Discussion, or run UPDATE wp_posts SET comment_status = "open"; in phpMyAdmin. Existing comments will appear again on the front end.

What about pingbacks and trackbacks?

Disabling comments does not disable pingbacks and trackbacks by default. Go to Settings > Discussion and uncheck Allow link notifications from other blogs to disable those as well.

Can I allow comments on just one post if I have them disabled site-wide?

If you use the wp-config method, no. The define takes precedence and cannot be overridden per-post. Use Method 2 or 3 for selective control.