Roles and Capabilities (original) (raw)

WordPress uses a concept of Roles, designed to give the site owner the ability to control what users can and cannot do within the site. A site owner can manage the user access to such tasks as writing and editing posts, creating Pages, creating categories, moderating comments, managing plugins, managing themes, and managing other users, by assigning a specific role to each of the users.

WordPress has six pre-defined roles: Super Admin, Administrator, Editor, Author, Contributor and Subscriber. Each role is allowed to perform a set of tasks called Capabilities. There are many capabilities including “publish_posts“, “moderate_comments“, and “edit_users“. A default set of capabilities is pre-assigned to each role, but other capabilities can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced or removed using the add_role() and remove_role() functions.

The Super Admin role allows a user to perform all possible capabilities. Each of the other roles has a decreasing number of allowed capabilities. For instance, the Subscriber role has just the “read” capability. One particular role should not be considered to be senior to another role. Rather, consider that roles define the user’s responsibilities within the site.

Summary of Roles

Upon installing WordPress, an Administrator account is automatically created.

The default role for new users can be set in Administration Screens > Settings > General.

Roles

A Role defines a set of tasks a user assigned the role is allowed to perform. For instance, the Super Admin role encompasses every possible task that can be performed within a Network of virtual WordPress sites. The Administrator role limits the allowed tasks only to those which affect a single site. On the other hand, the Author role allows the execution of just a small subset of tasks.

The following sections list the default Roles and their capabilities:

Super Admin

Multisite Super Admins have, by default, all capabilities. The following Multisite-only capabilities are therefore only available to Super Admins:

In the case of single site WordPress installation, Administrators are, in effect, Super Admins. As such, they are the only ones to have access to additional admin capabilities.

Administrator

The capabilities of Administrators differs between single site and Multisite WordPress installations. All administrators have the following capabilities:

Additional Admin Capabilities

Only Administrators of single site installations have the following capabilities. In Multisite, only the Super Admin has these abilities:

Editor

Contributor

Subscriber

Special Cases

The following capabilities are special cases:

define( 'ALLOW_UNFILTERED_UPLOADS', true );

With this constant defined, all roles on a single site install can be given the unfiltered_upload capability, but only Super Admins can be given the capability on a Multisite install.

Capability vs. Role Table

Note that the capabilities of Administrators differs between single site and Multisite WordPress installations, as described above .

Capability Super Admin Administrator Editor Author Contributor Subscriber
create_sites yes x x x x x
delete_sites yes x x x x x
manage_network yes x x x x x
manage_sites yes x x x x x
manage_network_users yes x x x x x
manage_network_plugins yes x x x x x
manage_network_themes yes x x x x x
manage_network_options yes x x x x x
upload_plugins yes x x x x x
upload_themes yes x x x x x
upload_network yes x x x x x
upgrade_network yes x x x x x
setup_network yes x x x x x
activate_plugins yes yes (single site or enabled by network setting) x x x x
create_users yes yes (single site) x x x x
delete_plugins yes yes (single site) x x x x
delete_themes yes yes (single site) x x x x
delete_users yes yes (single site) x x x x
edit_files yes yes (single site) x x x x
edit_plugins yes yes (single site) x x x x
edit_theme_options yes yes x x x x
edit_themes yes yes (single site) x x x x
edit_users yes yes (single site) x x x x
export yes yes x x x x
import yes yes x x x x
install_plugins yes yes (single site) x x x x
install_themes yes yes (single site) x x x x
list_users yes yes x x x x
manage_options yes yes x x x x
promote_users yes yes x x x x
remove_users yes yes x x x x
switch_themes yes yes x x x x
update_core yes yes (single site) x x x x
update_plugins yes yes (single site) x x x x
update_themes yes yes (single site) x x x x
edit_dashboard yes yes x x x x
customize yes yes x x x x
delete_site yes yes x x x x
moderate_comments yes yes yes x x x
manage_categories yes yes yes x x x
manage_links yes yes yes x x x
edit_others_posts yes yes yes x x x
edit_pages yes yes yes x x x
edit_others_pages yes yes yes x x x
edit_published_pages yes yes yes x x x
publish_pages yes yes yes x x x
delete_pages yes yes yes x x x
delete_others_pages yes yes yes x x x
delete_published_pages yes yes yes x x x
delete_others_pos yes yes yes x x x
delete_private_posts yes yes yes x x x
edit_private_posts yes yes yes x x x
read_private_posts yes yes yes x x x
delete_private_pages yes yes yes x x x
edit_private_pages yes yes yes x x x
read_private_pages yes yes yes x x x
unfiltered_html yes yes (single site) yes (single site) x x x
unfiltered_html yes yes yes x x x
edit_published_posts yes yes yes yes x x
upload_files yes yes yes yes x x
publish_posts yes yes yes yes x x
delete_published_posts yes yes yes yes x x
edit_posts yes yes yes yes yes x
delete_posts yes yes yes yes yes x
read yes yes yes yes yes yes

Capabilities

switch_themes

edit_themes

edit_theme_options

install_themes

activate_plugins

edit_plugins

install_plugins

edit_users

edit_files

manage_options

manage_categories

upload_files

import

unfiltered_html

edit_posts

edit_others_posts

edit_published_posts

publish_posts

edit_pages

read

publish_pages

edit_others_pages

edit_published_pages

delete_pages

delete_others_pages

delete_published_pages

delete_posts

delete_others_posts

delete_published_posts

delete_private_posts

edit_private_posts

read_private_posts

delete_private_pages

edit_private_pages

read_private_pages

delete_users

create_users

unfiltered_upload

edit_dashboard

customize

delete_site

update_plugins

delete_plugins

update_themes

update_core

list_users

remove_users

add_users

promote_users

delete_themes

export

create_sites

delete_sites

manage_network

manage_sites

manage_network_users

manage_network_themes

manage_network_options

manage_network_plugins

upload_plugins

upload_themes

upgrade_network

setup_network

Resources

Plugins