How to Stop WordPress Users from Creating New Posts
We recently wrote about the edit_posts permission in WordPress.
This permission is incredibly powerful. The edit_posts permission controls access to at least 6 important writing features in WordPress:
- Access the Posts screen.
- Create new Posts.
- Edit your own Posts.
- Upload and edit Media.
- Access the Comments screen.
- Access the Tools screen
Because one permission covers access to so many areas, it offers limited flexibility. Many PublishPress users want to be more flexible and only assign some of the options to uses. Here are some example requests from PublishPress users:
“I need to set up users to they only have access to edit their page. They should not be able to add or edit any new pages.”
“My client runs a law firm and employs 50 attorneys. They would like each attorney to be able to login to the WordPress backend and be presented only with the option to update their single post. They should not be allowed to create posts.”
These problems can't be solved with edit_posts because that permission allows you to both create and edit posts. The best way to solve all these problems is with the create_posts permission.
How to use the create_posts permission
I recommend that you install the PublishPress Capabilities plugin. These plugins will work together to give you the permissions you need.
- Go to Capabilities in your WordPress admin area.
- Look for the “Force Type-Specific Capabilities” box in the right sidebar.
- Check the box “Use create_posts capability”
- Click the “Update” button.
Now you can control who is able to create new posts.
Please note: when you enable create_posts, some user roles will automatically lose the ability to create posts: Contributors, Authors and Editors. You must now actively give the create_posts permission to every role that needs it.
- In the top-right corner of the screen, load the user role that you want to customize. In this image below, I’ve chosen the “Editor” role:
In the center of the screen, you can now set the permissions. If you want to allow people in the Editor role to create posts, check the boxes in the “Create” column
In the image above, Editors can edit Posts and Pages but not create new Posts and Pages.
So create_posts is a very useful permission. It allows to have separate control over creating content and editing content in WordPress.
If you want to read more on this, check out this guide to letting users edit specific pages.