PHPackages                             yard/wp-user-roles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. yard/wp-user-roles

ActivePackage[Authentication &amp; Authorization](/categories/authentication)

yard/wp-user-roles
==================

An Acorn package for managing user roles in WordPress.

v2.0.4(1mo ago)114.4k↓34.5%[1 issues](https://github.com/yardinternet/wp-user-roles/issues)MITPHPPHP &gt;=8.2CI passing

Since Sep 3Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/yardinternet/wp-user-roles)[ Packagist](https://packagist.org/packages/yard/wp-user-roles)[ RSS](/packages/yard-wp-user-roles/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (19)Versions (9)Used By (0)

wp-user-roles
=============

[](#wp-user-roles)

[![Code Style](https://github.com/yardinternet/wp-user-roles/actions/workflows/format-php.yml/badge.svg?no-cache)](https://github.com/yardinternet/wp-user-roles/actions/workflows/format-php.yml)[![PHPStan](https://github.com/yardinternet/wp-user-roles/actions/workflows/phpstan.yml/badge.svg?no-cache)](https://github.com/yardinternet/wp-user-roles/actions/workflows/phpstan.yml)[![Tests](https://github.com/yardinternet/wp-user-roles/actions/workflows/run-tests.yml/badge.svg?no-cache)](https://github.com/yardinternet/wp-user-roles/actions/workflows/run-tests.yml)[![Code Coverage Badge](https://github.com/yardinternet/wp-user-roles/raw/badges/coverage.svg)](https://github.com/yardinternet/wp-user-roles/actions/workflows/badges.yml)[![Lines of Code Badge](https://github.com/yardinternet/wp-user-roles/raw/badges/lines-of-code.svg)](https://github.com/yardinternet/wp-user-roles/actions/workflows/badges.yml)

An Acorn package for managing user roles in WordPress.

Features
--------

[](#features)

- Configure: Define custom roles and capabilities with a configuration file.
- (Re)Create: Insert roles into the database with a single wp-cli command.
- Clone roles: Quickly set up new roles based on existing ones.
- Delete roles: Remove any roles that you don’t need.

See [config](./config/user-roles.php) for all configuration options.

Requirements
------------

[](#requirements)

- [Sage](https://github.com/roots/sage) &gt;= 10.0
- [Acorn](https://github.com/roots/acorn) &gt;= 4.0

Installation
------------

[](#installation)

1. Install this package with Composer:

    ```
    composer require yard/wp-user-roles
    ```
2. Run the Acorn WP-CLI command to discover this package:

    ```
    wp acorn package:discover
    ```

Usage
-----

[](#usage)

1. Publish the config file with:

    ```
    wp acorn vendor:publish --provider="Yard\UserRoles\UserRolesServiceProvider"
    ```
2. Run WP-CLI command to create roles:

    Single site:

    ```
    wp acorn roles:create
    ```

    In a multisite:

    ```
    wp site list --field=url | xargs -n1 -I % wp acorn roles:create --url=%
    ```

About us
--------

[](#about-us)

[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~125 days

Total

6

Last Release

53d ago

Major Versions

1.0.0 → 2.0.02024-11-08

PHP version history (3 changes)1.0.0PHP ^8.0

2.0.0PHP &gt;=8.1

v2.0.4PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (73 commits)")[![SimonvanWijhe](https://avatars.githubusercontent.com/u/41121933?v=4)](https://github.com/SimonvanWijhe "SimonvanWijhe (37 commits)")[![ictbeheer](https://avatars.githubusercontent.com/u/14947039?v=4)](https://github.com/ictbeheer "ictbeheer (14 commits)")[![FreakyWizard](https://avatars.githubusercontent.com/u/114140418?v=4)](https://github.com/FreakyWizard "FreakyWizard (2 commits)")

---

Tags

acornpackagewordpress

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/yard-wp-user-roles/health.svg)

```
[![Health](https://phpackages.com/badges/yard-wp-user-roles/health.svg)](https://phpackages.com/packages/yard-wp-user-roles)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[spatie/laravel-passkeys

Use passkeys in your Laravel app

444494.4k16](/packages/spatie-laravel-passkeys)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[binary-cats/laravel-rbac

Laravel enum-backed RBAC extension of spatie/laravel-permission

7730.4k](/packages/binary-cats-laravel-rbac)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

5925.8k](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
