<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y" -->

---
title: Migrating from spatie/laravel-permission to Redis: A...
description: A production migration playbook for moving from spatie/laravel-permission to a Redis-backed permission resolver via the laravel-permissions-redis package,...
canonical: https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Migrating from spatie/laravel-permission to Redis: A Production Playbook | daily.dev
og:description: A production migration playbook for moving from spatie/laravel-permission to a Redis-backed permission resolver via the laravel-permissions-redis package,...
og:url: https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y
og:image: https://api.daily.dev/og/posts/EECw6Jy5Y.png
og:image:alt: Migrating from spatie/laravel-permission to Redis: A Production Playbook
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from spatie/laravel-permission to Redis: A Production Playbook

**[Medium](https://daily.dev/sources/medium_js)** · 7 min read · 0 upvotes · 0 comments

## Summary

A production migration playbook for moving from spatie/laravel-permission to a Redis-backed permission resolver via the laravel-permissions-redis package, written by its maintainer. It covers what changes under the hood (per-user permission sets stored as Redis SETs with O(1) SISMEMBER checks instead of per-request Eloquent relation loads), realistic performance expectations (roughly 1.3-1.4x wall-clock on SQLite, near a wash on networked databases, but about 75% fewer authorization queries hitting the database), a pre-migration audit checklist (API surface like getDirectPermissions, hasDirectPermission, teams feature), the migration commands, production cutover steps (deploy sequencing, --force flag for scripted flushes, verification via php artisan about, rollback plan, Octane considerations), known gotchas (guard isolation, TTL cooldown tuning, syncPermissions() variadic behavior since v4.1.0), and explicit cases where the migration is not worth doing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@sebarca0/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eaf10f807e1a>

## Questions this post answers

### How do I migrate from spatie/laravel-permission to a Redis-based permissions package without downtime?

Install the Redis package alongside Spatie since they coexist, run the migrate-from-spatie command with --dry-run first, then run it for real in the same release as the code deploy so it adds two nullable columns idempotently and warms Redis before traffic hits. For large user tables, warm through a queue with the --queue flag instead of blocking the deploy. Remove Spatie only after your test suite passes.

_Teams weighing a zero-downtime authorization migration can track playbooks like this one on daily.dev._

### What Laravel and PHP versions does laravel-permissions-redis require?

It requires PHP 8.3 or higher and Laravel 12 or 13, plus a Redis connection via phpredis or predis. Laravel 11 installs but is only best-effort, since continuous integration only covers versions 12 and 13. Teams on PHP below 8.3 or Laravel below 11 should stay on spatie/laravel-permission, which supports much older versions.

_Developers checking compatibility before an authorization migration can follow version requirements like these on daily.dev._

### Is switching from spatie/laravel-permission to Redis-backed permissions worth it for performance?

Only if authorization queries are a measurable share of database load; benchmarks show per-request wall clock improves roughly 1.3-1.4x on SQLite and is close to a wash against a networked database. The real benefit is removing about 75% of authorization queries from the database and avoiding full cache reload stampedes when permissions change, not raw latency gains.

_Engineers deciding whether an authorization migration is worth the complexity can weigh trade-offs like these on daily.dev._

## Similar posts on daily.dev

- [How we migrated the database behind every Vercel build](https://daily.dev/posts/how-we-migrated-the-database-behind-every-vercel-build-wstvjzabz) · Vercel · 3 upvotes · 2 comments
- [Moving Marketing Cloud Caching from Memcached to Redis at 1.5M RPS](https://daily.dev/posts/moving-marketing-cloud-caching-from-memcached-to-redis-at-1-5m-rps-epsn0tifr) · Salesforce Engineering · 1 upvotes · 0 comments
- [Redis Cluster Support for Queues in Laravel 13.5.0](https://daily.dev/posts/redis-cluster-support-for-queues-in-laravel-13-5-0-a2vjzx26m) · Laravel News · 28 upvotes · 1 comments
- [We replaced Redis with MySQL for inventory reservations—and it scaled \(2026\)](https://daily.dev/posts/we-replaced-redis-with-mysql-for-inventory-reservations-and-it-scaled-2026--7uecbcooa) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#redis](https://daily.dev/tags/redis), [#authorization](https://daily.dev/tags/authorization)

[View this post on daily.dev](https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Migrating from spatie/laravel-permission to Redis: A Production Playbook","url":"https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y"},"datePublished":"2026-08-22T18:13:46.367Z","dateModified":"2026-09-14T09:20:59.677Z","description":"A production migration playbook for moving from spatie/laravel-permission to a Redis-backed permission resolver via the laravel-permissions-redis package,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/16b28096f4efb67237bfbdc5a0a79932?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/16b28096f4efb67237bfbdc5a0a79932?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,laravel,redis,authorization","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Migrating from spatie/laravel-permission to Redis: A Production Playbook"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/migrating-from-spatie-laravel-permission-to-redis-a-production-playbook-eecw6jy5y#faq","mainEntity":[{"@type":"Question","name":"How do I migrate from spatie/laravel-permission to a Redis-based permissions package without downtime?","acceptedAnswer":{"@type":"Answer","text":"Install the Redis package alongside Spatie since they coexist, run the migrate-from-spatie command with --dry-run first, then run it for real in the same release as the code deploy so it adds two nullable columns idempotently and warms Redis before traffic hits. For large user tables, warm through a queue with the --queue flag instead of blocking the deploy. Remove Spatie only after your test suite passes. Teams weighing a zero-downtime authorization migration can track playbooks like this one on daily.dev."}},{"@type":"Question","name":"What Laravel and PHP versions does laravel-permissions-redis require?","acceptedAnswer":{"@type":"Answer","text":"It requires PHP 8.3 or higher and Laravel 12 or 13, plus a Redis connection via phpredis or predis. Laravel 11 installs but is only best-effort, since continuous integration only covers versions 12 and 13. Teams on PHP below 8.3 or Laravel below 11 should stay on spatie/laravel-permission, which supports much older versions. Developers checking compatibility before an authorization migration can follow version requirements like these on daily.dev."}},{"@type":"Question","name":"Is switching from spatie/laravel-permission to Redis-backed permissions worth it for performance?","acceptedAnswer":{"@type":"Answer","text":"Only if authorization queries are a measurable share of database load; benchmarks show per-request wall clock improves roughly 1.3-1.4x on SQLite and is close to a wash against a networked database. The real benefit is removing about 75% of authorization queries from the database and avoiding full cache reload stampedes when permissions change, not raw latency gains. Engineers deciding whether an authorization migration is worth the complexity can weigh trade-offs like these on daily.dev."}}]}
```

