WordPress Development

WordPress User Roles and Capabilities, Actually Explained

Subscriber holds one capability, Administrator all fifty. What the five WordPress user roles really grant, why code checks capabilities instead of role names, and how to build a role that fits the job.

WordPress User Roles and Capabilities, Actually Explained

A freelancer needs to change one menu item, so they get an administrator account. The new writer only submits drafts, but Author sounded too junior and Editor about right, so now they can delete every post on the site. The role dropdown on the Add New User screen offers five words and explains none of them, which is how most WordPress sites end up with more administrators than people who should hold that power.

The five names hide a simple structure. A role in WordPress is nothing more than a named bundle of capabilities: individual yes or no grants with names like upload_files or moderate_comments. On a fresh single-site install, core hands out exactly 50 of them. Subscriber holds one. Contributor holds three. Author holds seven, Editor 26, Administrator all 50.

Once you see the bundles, the dropdown stops being a guess. What follows is what each role actually adds, why WordPress code checks capabilities rather than role names, and where roles physically live: one database row, which has consequences for how you create your own.

Five bundles, not a ladder

The default roles look like a ladder, and mostly behave like one: each role contains everything the role below it holds, plus a handful of new grants. But WordPress itself never treats them as ranks. Nowhere in core is there a comparison that asks whether one role outranks another. Every menu item, every button, every screen in the admin comes down to a single question, asked one capability at a time: may this user do this one thing?

The explorer below shows the whole picture: the five default roles against the 50 capabilities core really grants them, read from a live install rather than copied from a tutorial. Filter the matrix (type delete into the search and eleven of the 50 rows remain, which says something about what WordPress thinks needs guarding), diff any two roles, or assemble a role of your own and take the generated code with you. It runs entirely in your browser tab; nothing you type or tick is sent anywhere.

User roles explorer

The five default WordPress roles against the capabilities core really grants them, read from a fresh install. Compare two roles side by side, or tick together a role of your own and take the code with you. Everything runs in this browser tab, nothing is sent anywhere.

This is what a fresh single-site install grants. Plugins add their own capabilities on top, and the multisite-only ones stay out. Click a capability name for a one-line description. The level_0 to level_10 capabilities also still sit on every role, but they are a leftover from before roles existed and have been legacy since WordPress 3.0, so the matrix leaves them out.

WunderPaint
The Dynamic Design and Automation Studio
WunderPaint is a layered image editor for your WordPress media library. WunderPaint Studio is the same thing in any browser, free and without an account.

What each role actually adds

Subscriber holds a single capability: read. The name misleads. Nobody needs an account to read a public site; read gates access to the admin dashboard and the profile screen, nothing more. A subscriber can log in, change their own password and display name, and that is the entire job description. It is also the safety default: self-registrations receive whatever the default_role option holds, and on an untouched install that is subscriber.

Contributor adds edit_posts and delete_posts. Both apply to the contributor’s own unpublished posts: they can write drafts, edit them, delete them, and submit them for review. They cannot publish, and, the detail that surprises everyone, they cannot upload files. Without upload_files there is no Add Media button, so every image in a contributor’s draft has to be placed by someone with a bigger bundle. Whether that is a bug or the whole point depends on how much you trust your contributors.

Author is the first role that can put something live. It adds upload_files, publish_posts, edit_published_posts and delete_published_posts. Note the last two: an author can edit or delete their own posts after publication, indefinitely. If your workflow assumes published content is frozen, the Author role does not enforce that.

Editor jumps from seven capabilities to 26; the Compare tab’s preset, editor against author, lists all 19 additions in one column. They fall into three groups. Other people’s content: edit_others_posts, delete_others_posts and the private variants. Pages: contributors and authors cannot touch pages at all; everything from edit_pages to publish_pages arrives with Editor. And site housekeeping: moderate_comments, manage_categories, manage_links. The quiet one is unfiltered_html: on a single site, editors may save raw HTML including script tags. An editor account is a security boundary, not just a workflow tier.

Administrator adds the remaining 24, and not one of them is about content. Plugins: install, activate, update, delete, edit. Themes: switch, install, edit, plus edit_theme_options, which covers menus and widgets. Users: create, edit, promote, delete. Then manage_options for every settings screen, update_core, import, export, unfiltered_upload and edit_files. Each one changes what the site is rather than what it says.

Dot matrix of ten core capabilities against the five default WordPress roles, from read for subscribers to install_plugins for administrators only

Two footnotes from the live list. First, wp cap list also prints level_0 through level_10: leftovers of the user level system that roles replaced, deprecated since WordPress 3.0 and kept only so ancient plugins do not break. Ignore them. Second, upload_files opens the media library but says nothing about file types; uploads still pass a MIME whitelist, which is why an SVG upload fails even for an administrator.

Code checks capabilities, not roles

Every gate in WordPress runs through one function: current_user_can(), defined in wp-includes/capabilities.php. Menu registrations declare the capability a user needs before the screen appears. The editor asks before showing the Publish button. Plugins ask before rendering their settings pages. The question is always a capability, never a role.

if ( current_user_can( 'edit_others_posts' ) ) {
    // show the review queue
}

You can watch this in plugin code everywhere: add_menu_page() takes a capability as its third argument, and most settings screens pass manage_options, which is why entire admin menus vanish the moment you log in as an editor. Nothing was hidden from a role. Every item asked its own question and got a no.

For anything that touches a specific object there is a second layer. current_user_can( 'edit_post', 42 ) does not look up a stored capability called edit_post; it hands the request to map_meta_cap(), which inspects post 42 and decides which primitive capabilities are actually required. Your own draft needs edit_posts. Someone else’s draft needs edit_others_posts on top. A published post adds edit_published_posts. That resolution step is the reason the stored capabilities come in those repetitive triples, and it is why the matrix looks the way it does.

Passing a role name, as in current_user_can( 'editor' ), happens to work because the role slug sits in the user’s capability list, but core’s own documentation warns against relying on it. It also breaks in practice: capabilities can be granted to a single user with no role change at all (WP_User::add_cap() writes into usermeta), and a custom role with editor-equivalent grants would fail every such check while passing every real one. Check the capability that gates the action. The role is just packaging.

Roles live in the database, not in code

The bundles are not hardcoded anywhere. At install time, populate_roles() in wp-admin/includes/schema.php writes all five default roles into a single option named user_roles with your table prefix in front, so the row is usually called wp_user_roles. One serialized PHP array holds every role, every display name and every grant. On the install behind this article that row has grown past 11 KB, because every plugin that registers its own capabilities appends them to the same array. Serialized also means byte-counted, which is why this exact row is a classic casualty of careless search and replace during a migration.

The option is only half of the picture. Which bundle a given user holds lives on the other side of the join, in a usermeta row named capabilities (again with the table prefix), and it is another serialized array, usually containing nothing but the role slug: a:1:{s:6:"editor";b:1;}. When WordPress builds a user object it merges that row with the roles option into one flat capability list, and that merged list is what current_user_can() actually consults. Promoting or demoting someone rewrites one usermeta row and touches nothing else, and a per-user add_cap() lands in the same row, next to the slug.

Storing roles as data has two consequences that catch almost everyone writing their first add_role() call. The first: add_role() writes to that option, so it only needs to run once, ever. The second: once the role exists, add_role() returns null and changes nothing. Paste it into functions.php, tweak the capability array a week later, and your edit silently never lands: the copy in the database wins. The clean pattern runs the call in an activation hook and keeps remove_role() ready for the day you want to rebuild it:

register_activation_hook( __FILE__, function () {
    add_role( 'content_manager', 'Content Manager', array(
        'read'              => true,
        'edit_posts'        => true,
        'edit_others_posts' => true,
        'upload_files'      => true,
    ) );
} );

// Counterpart, for deactivation or a rebuild:
// remove_role( 'content_manager' );
Four step flow showing how roles enter the wp_user_roles option at install and plugin activation, and why editing add_role code later changes nothing

The Build tab of the explorer emits exactly this shape: pick a base role to copy its ticks, adjust the checkboxes, and the snippet updates with the activation hook wrapper and the remove_role() counterpart as a comment. The slug field enforces what WordPress expects, lowercase letters and underscores, before any code appears. And if you later register a custom post type with its own capability_type, the same logic extends: the post type mints new capability names such as edit_products, and some role has to be granted them or nobody sees the screen.

The account you use every day

The practical payoff of all this is a habit: stop working as an administrator. Even on a site you own alone, create a second account with the Editor role and write with that one. Every capability you carry while logged in is attack surface. A forged request or a stolen session cookie inherits your bundle, and an editor session cannot install a plugin, edit a theme file or create a new administrator. You lose nothing day to day; the admin account is still there for the Tuesday you actually update something.

For everyone else, match the bundle to the job, and reach for a single capability before a bigger role. The freelancer from the first paragraph needs menus, and menus are gated by edit_theme_options: one administrator-only capability, not all 24. A role holding read plus edit_theme_options, assembled in the Build tab in a minute, does that job with no route to the plugin screen. (One note for multisite: super admin is not a sixth role but a network-wide flag stored outside the roles option, and ordinary administrators lose several of the 50 there because plugin and theme powers move up to the network.)

The dropdown will stay five unexplained words, but the structure underneath is small enough to actually know: 50 grants, five bundles, one serialized row, and a single function asking one capability at a time. That is the entire system. For most sites it makes a role management plugin unnecessary; a ten line activation hook covers what those plugins are usually installed for.

The role dropdown trains you to ask which of five words a person is. The capability list asks a better question: which actions does this job need, and what is the smallest bundle that covers them? On most sites the honest answer involves fewer administrators than exist today, one custom role that should have been created years ago, and a site owner who writes as an editor and logs in as an administrator twice a month.

WordPress User Roles and Capabilities, Actually Explained

Table of Contents

Learn it by building something

Every week one thing you can make the same afternoon, from dynamic templates to 3D type. Written down step by step.

One mail a week, and then it ends.
Unsubscribe in one click.

Security & Privacy

Black out every piece of text in a screenshot before you share it

A tool that guesses which text is sensitive will miss the one that mattered. This one covers every text field it finds and lets you click back what can stay. It also refuses to default to a blur, because blurring and pixelation can be undone, and there is published work showing exactly how.

WordPress Images

Clean Up WordPress Media Library Without Breaking Pages

An attachment is a row in wp_posts; its files sit somewhere else, and deleting one does not delete the other. What to measure before you start, why "unused" is so hard to prove, and the order of operations that keeps the site up.

WordPress Images

Best Image Format for WordPress: WebP, AVIF, JPEG or PNG

Two thirds of this site's media library is PNG, and nobody decided that. What WordPress actually does with an uploaded file, what its default encoder quality really is, and the three filters that change the format and the size of every sub-size it writes.

Photo Editing

Content Aware Resize: Changing a Photo’s Shape Without Squashing Anyone

One photograph has to be a wide header, a square thumbnail and a tall story card. Cropping loses the edges, stretching lies about proportions, letterboxing buys space it never uses. Seam carving spends the quiet parts of the frame instead: what a seam is, why the search needs a table, and exactly where the method falls apart.

Troubleshooting

Why Is Your WordPress Site Slow? A Diagnostic Order, Not a Checklist

WordPress performance advice is usually handed over as a flat, alphabetized checklist. This walks through the same fixes in the order they actually pay off, starting with the thing most sites get wrong first: images.

Troubleshooting

Serialized Data Repair and Search Replace: The Bytes That Break a Migration

One UPDATE with REPLACE() over wp_options is all it takes to kill a WordPress site after a migration, without printing a single error. The reason is a number baked into PHP's serialization format, and the fix is counting bytes.

Download the free WunderPaint Plugin for WordPress

The WunderPaint workspace with the layers panel, adjustment sliders, text style presets and the asset library along the bottom

The Image Editor & Design Studio

Everything described here can be done in the browser, on your own site. The live demo runs the full editor with nothing to install.

Free

Chaos Art

Autonomous painters make one-of-a-kind abstract art in 3D space - gestures, art movements, painterly media, and embeds that paint a new original for every visitor.

Pro

Particle Strokes

Paint with swarms of light: twenty-two movements, a stamp you draw yourself, and curves that give a stroke a shape - the swarm keeps painting for a few seconds after you let go.

Pro

City Diorama

Any place on earth as a miniature you could hold: real streets, water and building footprints raised into a 3D diorama - or wrapped around a sphere as your own tiny planet.

Free

Papercut Art

Layered paper pictures with real depth - a photo sliced along its actual depth into up to twenty layers, parametric landscapes, animals and clouds you can shape, letters with real counters, and a look that runs on three dials.

Pro

3D Earth Studio

A hyperrealistic globe - day and night with city lights, live clouds, atmosphere halo, country borders and highlights, click-to-place markers with flight-route arcs, satellite orbits, seamless rotation video and a live website embed.

Free

Mystic Studio

Turn a birth date into wall art - a real natal chart with houses and aspects, the moon of that night, zodiac and Chinese zodiac posters, numerology cards and a synastry wheel for two, in eight artful themes.

Free

Marble Bath

Marble paper on a virtual water bath - drop, rake and comb real Ebru patterns with gestures, flowers and classic recipes, razor-sharp at any size and re-editable as a layer.

Free

Day Ring

Turn a day into a beautiful circular schedule - colour-coded time blocks as arcs around a 24-hour clock, with concentric rings for overlaps, emoji, templates and a legend.

Free

Code Shot

Turn code into a gorgeous, share-ready image - syntax highlighting, editor themes, window frames and diff highlighting - then drop it into your design as a re-editable layer.

Pro

3D Solar System Studio

Build a date-accurate 3D solar system - real planet positions for any date, photoreal textures and one slider from artistic to true scale - then drop it into your design as an editable layer.

Pro

3D Molecule Studio

Build a real 3D molecule - from a curated library, the periodic table or a SMILES string - then style it, measure it and drop it into your design as an editable layer.

Pro

3D Textile Studio

Drop your design onto cloth that behaves like the material you pick: silk falls soft, felt holds its shape, flag fabric snaps in the wind. Hang it, blow it and drape it, then lay the finished drape back into your document as a picture.

Pro

3D Particle Studio

Point the engine at any layer and it becomes a cloud of particles that keeps its colours, flowing through a sphere, a galaxy or your own outline. Keep the frame you like as a still, or embed the running engine so it keeps moving on your page.

Free

Origami

Put your own picture on the paper and watch that very sheet fold itself into a crane or a box. Every step is a station you can stop at and turn around in 3D, which is exactly where printed diagrams leave you alone.

Pro

3D Flip Studio

A hardcover you can leaf through, a limp magazine, a strewn pile of sheets, a sticker peeling off its backing. The curl is real geometry, so the print never slides across the paper.

Free

Handwriting Fonts

Draw the alphabet here or fill in a printed sheet and photograph it. What comes out is a genuine font family, installed into your site and available in every picker.

Pro

Step Guides

Turn any picture into an instruction. Every mark is pinned to a place in the image, so arrows still point at the right thing after the callout has been dragged somewhere else.

Free

Text Art

One studio, sixteen art types: ASCII and emoji art, brick, dice, cube, sticky-note, LED, ceramic and keycap mosaics, word portraits, text flows, silhouettes, element tiles and more.

Free

Photo Mosaic

The classic photomosaic, computed in your browser: your main image emerges from many media-library photos via true structure matching - never a cheap overlay.

Free

Puzzle Sheets

Generate printable puzzle sheets: word search, mazes in eight shapes, sudoku with unique solutions, criss-cross, cryptograms and number pyramids.