WPBeginner Releases a Comment Moderator Solution Often Needed for Large Teams

Last week, WPBeginner released Comment Moderation Role to the WordPress plugin directory. The plugin does a simple job of creating a single user role that can only moderate comments.

The most common use case for such a role — named “WPB Comment Moderator” in the admin — is for larger teams that need a separate user account to tackle moderation. WordPress has no built-in way of handling this. For one of the most extendable CMSs on the planet, this is one area where it has always fallen short.

It almost feels like yesterday. In reality, it was 10 years ago when I stumbled upon a (then) year-old ticket for a bug that was a breaking point in a project I was working on. I needed to grant specific users on a WordPress site permission to moderate comments but not allow them to edit other things in the admin.

Some of you may be thinking that the moderate_comments capability should allow that. And, you would be correct in thinking that it should. However, that is not how it works at all. For users to edit comments, they must also be able to edit posts. It is a bit of a convoluted mess if you do a deep dive into the core code only to find hard-coded permissions checks that are impossible to override without rewriting large chunks of code.

I would run into the same issue multiple times in the years since. I have built a few hacky, one-off workarounds for specific projects, but they were never ideal. And, I was never interested in maintaining a plugin that solved this problem because I knew it had the potential to be a bit of a pain.

While I have seen a few other solutions, each fundamentally flawed, I am happy to see someone tackling this without exposing permissions issues.

WPBeginner’s Comment Moderation Role plugin works in the same way that I think such a plugin should work, at least with the roadblocks that WordPress currently puts in the way.

Site administrators can add WPB Comment Moderator to any account via the user management admin screen. The process is the same as adding or removing any other role in WordPress.

Screenshot of the WordPress user management screen, assigning a role to a user.
Granting the WPB Comment Moderator role to a user.

After adding the role to a user, that user can access the Comments admin screen. They can also see both the Dashboard and their own Profile in the admin. Except in the cases where they have another role added via a different plugin, they will not have permission to access other screens.

Comments management screen when viewed as a user with the WPB Comment Moderator role.
Comments admin screen for user with the WPB Comment Moderator role

Because of core WordPress’s hard-coded permissions check, the plugin must create its own comments management screen. Most users will not notice this because it is all under the hood. The plugin only adds it when necessary, and it does not look or function any differently than the default screen. It is just a lot of code work and duplication to fix an 11-year-old reported bug in WordPress.

Until the foundational issue is addressed in core WordPress, Comment Moderation Role is the best plugin for this job. After extensive testing, I can now say that it is now nestled firmly in my toolbox, ready to pull out when needed for a project.

3 responses to “WPBeginner Releases a Comment Moderator Solution Often Needed for Large Teams”

  1. I’ve always thought that comments in WordPress have been a mess left behind without any afterthought. I’d really like to see more work done to core to rewrite the whole experience that is pretty woeful.

    I’ve seen lots of sites actually turn comments off and use third party services just to make it a bit easier.

  2. I remember, about 12 years ago, when someone pointed this out as one of the big failings; right after a moderator changed the title of a page/site (which was shown live on Channel 4 on a Sunday morning) to “fck fckety fck fck fck”.

    They were repeatedly told that it wasn’t an issue… and didn’t really happen in the real world… and that you just needed moderators you could 100% trust.

  3. This is great improvement and good for site with huge comment engagement.

    But this would be good, if the admin want to assign this comment moderation role to someone.

    I guess this is only giving access to the comment section in the wordpress dashboard not to other part.

    I love this.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: