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(3mo ago)115.5k↓54.3%[1 issues](https://github.com/yardinternet/wp-user-roles/issues)MITPHPPHP &gt;=8.2CI passing

Since Sep 3Pushed 3w 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 (12)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 95% of packages

Maintenance87

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.3% 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

99d 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] (84 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

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6649.5k1](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

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