How to limit the number of posts a user can publish on your WordPress site

WP Tips

Why would you ever want to limit the number of posts a user can publish?

I saw a question about limiting post creation for authors just the other day in our Advanced WordPress Facebook Group. Then, hours later, a client of mine asked about it for their own site. Then, yesterday someone else asked about it—looking for a plugin.

When you hear it that many times in such close proximity, you start to wonder about the “why”—why would anyone ever want to do this?

So I asked. Here were the three answers I got from the folks I was talking to:

  • One was having users create a custom post type for an entry into a competition. They only wanted two entries per person. (This sounded like a puzzle my friend Jared had to solve once.)
  • Another wanted to let premium members of their membership site publish articles to their site, but change the quantity based on their membership plan.
  • A third was dealing with a church website and wanted to moderate a multi-author blog so that no person got too carried away.

When you hear the real world scenarios, suddenly you realize it's a feature you've never thought about, but that it's no stranger than tons of other things you've done with WordPress.

So the question, once you get past the “Why?” is: has anyone solved this?

Has anyone created a plugin for this?

And the answer, thankfully, is that someone already has. And it's pretty simple to use.

Check out: Bainternet Post Creation Limits

The plugin does exactly what you think it would do—it lets you create different rules around the post creation feature of WordPress so that you can limit users from this activity.

I don't know the author of the plugin—meaning I've never met them—but I did have reason to recommend another of their plugins, Shortcodes UI, to a client for a project of theirs, and it worked beautifully.

Here's how it works

  1. You start by downloading and installing the plugin.
  2. Then you activate it.
  3. From there, you're going to want to create some rules.

Don't stress about the rules. The form you fill out is simple and small.

Here's the form you see when you create a new rule.

limit-rule1

The first selection box is focused on which role you want to limit. You never really want to use Admin, even though that's the default first selection. Go in and pick the role. In my case, my example was for a client who was using this inside of a membership site. So we had special roles (like Silver and Gold plans).

limit-rule-2

From there, you can determine what kind of post you want to protect. In my client's case, it was projects (a custom post type). But it could just as easily be normal posts.

The limits are self-explanatory. And the “status” option is what you're counting—your rule can focus on drafts, published posts, or another status.

Obviously, if a user gets locked out from creating a new post, having a message is critical, and that's what you fill in next.

Lastly y,ou may be trying to limit them by time, so you have that option.

When you're done, you'll see a list of your rules.

all-limit-rules

As you can see, in this sample, the user is limited based on which membership role they have.

And if you didn't know it, I write a lot about membership plugins and WordPress.

So there you go—that's how you can limit the number of posts a user can create on a WordPress site—based on rules you create using this plugin.

Good luck!