PHPackages                             altis/roles-to-taxonomy - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. altis/roles-to-taxonomy

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

altis/roles-to-taxonomy
=======================

WordPress plugin to store user roles and user levels in a taxonomy, for performance.

0.1.5(3y ago)9444.9k↓16.7%7[1 PRs](https://github.com/humanmade/roles-to-taxonomy/pulls)GPL-2.0-or-laterPHP

Since Sep 12Pushed 1y ago20 watchersCompare

[ Source](https://github.com/humanmade/roles-to-taxonomy)[ Packagist](https://packagist.org/packages/altis/roles-to-taxonomy)[ RSS](/packages/altis-roles-to-taxonomy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (8)Used By (0)

Roles to Taxonomy
=================

[](#roles-to-taxonomy)

WordPress plugin to store user roles and user levels in a taxonomy, for performance.

Having many users in a WordPress database leads to some bad performance when it comes to quering for users by role, user level, or counting users. This is particularly a problem because the default WordPress admin users list table, post table and post edit screens all make these queries.

The fundamental issue with the default WordPress storage mechanism is the use of Post Meta for user levels and roles. To add insult to injury, roles are stored as a serialized array, so any queries for users by role results in a MySQL `LIKE` query on an unindexed text column (`meta_value`).

Roles to Taxonomy registers two shadow taxonomies to associate user objects with role/user level terms. This results in a much faster lookup for users in a given role. The term `count` field is also be used to calculate user counts in some cases.

Performance Comparisons (2.2 million network users, 1.5 million on a single site)
---------------------------------------------------------------------------------

[](#performance-comparisons-22-million-network-users-15-million-on-a-single-site)

PageWordPress DefaultRoles to TaxonomyUser List Table (all)36 **seconds**7 millisecondsUser List Table (specific role)29 **seconds**5 millisecondsPost List Table31 seconds2 secondsSites List Table59 seconds4.3 secondsUsage
-----

[](#usage)

When you activate the plugin, you will need to backfill the taxonomies with the existing user roles and levels. The plugin comes with a WP CLI command to perform a synchronization of existing roles.

```
wp roles-to-taxonomy sync [--verbose] [--batch-size=] [--progress] [--offset=] [--fast-populate] [--limit=]

```

- `batch-size=x` dictates the chunks of users to process at a time. If you have 10,000+ users, you'll want to set this to reasonable chunks (say 5,000) to not exhaust all available memory.
- `progress` will output a progress bar.
- `limit=x` will restrict the total amount of user roles synced to taxonomies.
- `offset=x` will resume updating users from a given offset number.
- `fast-populate` will enable a very fast term/taxonomy population mode. This uses many direct SQL queries so bypass WordPress process, hooks, object cache etc. This is only recommended if you do not already have any users synced to taxonomies. This should only be used when you have 100,000+ users. In testing, it is able to insert use role and level terms at a rate of 1 million users per 15 minutes.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.5% 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 ~242 days

Recently: every ~292 days

Total

6

Last Release

1224d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21655?v=4)[Ryan McCue](/maintainers/rmccue)[@rmccue](https://github.com/rmccue)

![](https://www.gravatar.com/avatar/77dbeefb7745010589603f2ffc6ff310d8f700b58e08d52af190744c43342526?d=identicon)[roborourke](/maintainers/roborourke)

![](https://www.gravatar.com/avatar/f1d0ffccdc5d339ff98a91e1b224a0d92f93dc8c2f772124473a76655b83129c?d=identicon)[joehoyle](/maintainers/joehoyle)

---

Top Contributors

[![joehoyle](https://avatars.githubusercontent.com/u/161683?v=4)](https://github.com/joehoyle "joehoyle (19 commits)")[![rmccue](https://avatars.githubusercontent.com/u/21655?v=4)](https://github.com/rmccue "rmccue (4 commits)")[![kadamwhite](https://avatars.githubusercontent.com/u/442115?v=4)](https://github.com/kadamwhite "kadamwhite (2 commits)")[![stuartshields](https://avatars.githubusercontent.com/u/15369210?v=4)](https://github.com/stuartshields "stuartshields (2 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![TimothyBJacobs](https://avatars.githubusercontent.com/u/3460448?v=4)](https://github.com/TimothyBJacobs "TimothyBJacobs (1 commits)")

### Embed Badge

![Health badge](/badges/altis-roles-to-taxonomy/health.svg)

```
[![Health](https://phpackages.com/badges/altis-roles-to-taxonomy/health.svg)](https://phpackages.com/packages/altis-roles-to-taxonomy)
```

###  Alternatives

[rami/seo-bundle

All in One Symfony Seo Bundle

321.0k](/packages/rami-seo-bundle)

PHPackages © 2026

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