How the Use the Moderate Comments Capability in WordPress
The moderate_comments capability is one of the more confusing permissions in WordPress. It controls who can manage and post comments on your site.
I know many of you want to control who can manage or post comments on your site, so in this guide I'll explain how this capability works. You may also find it helpful to read our guide to authors managing comments on their own posts.
What can users do with the moderate_comments capability?
The moderate_comments capability allows you to do two things.
First, you can use “Approve”, “Reply”, “Edit” and other features on the “Comments” screen. However, this capability is not useful by itself:
- You also need the edit_posts capability that allows you access to the “Comments” screen.
- You also need the edit_other_posts capability to moderate comments on posts you have not written.
Second, with moderate_comments, your comments are published automatically.
- If you do not have the moderate_comments capability, you will see this message after posting a comment: “Your comment is awaiting moderation.”
- If you do have the the moderate_comments capability, your comments will be published automatically.
Who has the moderate_comments permission?
The moderate_comments permission is available on single WordPress sites and on multisite networks.
By default, the moderate_comments permission is only given to Super Admins, Administrators and Editors.
It's worth noting that users in the Author and Contributor roles can also access the “Comments” screen. However, they won't be able to manage the comments. This image shows what users in the Contributor role will see. All the comments are visible, but they can't be approved, deleted or edited.
How to control who has the moderate_comments permission
You can control who has the moderate_comments capability with the PublishPress Capabilities plugin.
- Install PublishPress Capabilities.
- Go to “Capabilities” in your WordPress admin menu.
- Using the dropdown in the top-left corner, choose the role you want to edit.
- Check the box “moderate_comments”.
- Click “Save Changes”.
More Guides to WordPress Capabilities
In the PublishPress Knowledge Base, you'll find a guide to every core capability in WordPress.
For example, there's a guide to “read” which every WordPress needs to have. There's also an overview of “edit_posts” which controls access to most of the key writing features in WordPress.
If you're ever unsure what a capability does in WordPress, head over to our knowledge base. You'll learn what it does, if it requires any other capabilities, and how to assign it to users.
If you're more interested in the technical side, check out where capabilities are stored in the WordPress database.