{"id":10937050,"date":"2018-12-01T12:56:13","date_gmt":"2018-12-01T12:56:13","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&p=10937050"},"modified":"2024-09-20T13:34:20","modified_gmt":"2024-09-20T13:34:20","slug":"roles-and-capabilities","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/roles-and-capabilities\/","title":{"rendered":"Roles and Capabilities"},"content":{"rendered":"\n
WordPress uses a concept of Roles<\/a>, designed to give the site<\/a> 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<\/a>, creating Pages<\/a>, creating categories<\/a>, moderating comments<\/a>, managing plugins<\/a>, managing themes<\/a>, and managing other users<\/a>, by assigning a specific role to each of the users.<\/p>\n\n\n\n WordPress has six pre-defined roles: Super Admin<\/a>, Administrator<\/a>, Editor<\/a>, Author<\/a>, Contributor<\/a> and Subscriber<\/a>. Each role is allowed to perform a set of tasks called Capabilities<\/a>. There are many capabilities including “publish_posts<\/a>“, “moderate_comments<\/a>“, and “edit_users<\/a>“. A default set<\/a> of capabilities is pre-assigned to each role, but other capabilities can be assigned or removed using the add_cap()<\/a> and remove_cap()<\/a> functions. New roles can be introduced or removed using the add_role()<\/a> and remove_role()<\/a> functions.<\/p>\n\n\n\n The Super Admin<\/a> 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<\/a> role has just the “read<\/a>” 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.<\/p>\n\n\n\n Upon installing WordPress, an Administrator account is automatically created.<\/p>\n\n\n\n The default role for new users can be set in Administration Screens<\/a> > Settings<\/a> > General<\/a>.<\/p>\n\n\n\n A Role defines a set of tasks a user assigned the role is allowed to perform. For instance, the Super Admin<\/a> role encompasses every possible task that can be performed within a Network<\/a> of virtual WordPress sites<\/a>. The Administrator<\/a> role limits the allowed tasks only to those which affect a single site. On the other hand, the Author<\/a> role allows the execution of just a small subset of tasks.<\/p>\n\n\n\n The following sections list the default Roles and their capabilities:<\/p>\n\n\n\n Multisite Super Admins have, by default, all capabilities. The following Multisite-only capabilities are therefore only available to Super Admins: <\/p>\n\n\n\n \n\n\nIn 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<\/a>.\n<\/p>\n\n\n\n \nThe capabilities of Administrators differs between single site and Multisite<\/a> WordPress installations. All administrators have the following capabilities:\n\n\n<\/p>\n\n\n\n \nOnly Administrators of single site installations have the following capabilities. In Multisite<\/a>, only the Super Admin has these abilities:\n\n\n<\/p>\n\n\n\n \nThe following capabilities are special cases:\n\n\n<\/p>\n\n\n\n \nWith 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.\n<\/p>\n\n\n\n Note that the capabilities of Administrators differs<\/strong> between single site and Multisite<\/a> WordPress installations, as described above<\/a> .<\/p>\n\n\n\nSummary of Roles<\/h2>\n\n\n\n
\n
Roles<\/h2>\n\n\n\n
Super Admin<\/h3>\n\n\n\n
\n
Administrator<\/h3>\n\n\n\n
\n
Additional Admin Capabilities<\/h4>\n\n\n\n
\n
Editor<\/h3>\n\n\n\n
\n
Author<\/h3>\n\n\n\n
\n
Contributor<\/h3>\n\n\n\n
\n
Subscriber<\/h3>\n\n\n\n
\n
Special Cases<\/h3>\n\n\n\n
\n
define( 'ALLOW_UNFILTERED_UPLOADS', true );<\/pre>\n\n\n\n
Capability vs. Role Table<\/h3>\n\n\n\n