DahuConcept Role Backup
v2.3.3Hugo Vial-Jaime · 2026年11月28日 上架
A safety net for WordPress roles and capabilities: timestamped snapshots taken daily and whenever they change, a readable diff, and an additive restore from the admin screen or WP-CLI.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 51
- 最近更新
- 2026年11月28日
贡献者
WordPress keeps every role and capability in a single option. One plugin
writing to it carelessly, one migration, one badly timed update, and a role
that half the site depends on is simply gone — with nothing to put back,
because nobody ever thought to copy it.
DahuConcept Role Backup copies it. Every day, and again whenever the option changes.
When a role disappears you open the list, compare, and put it back.
How it works
- A snapshot is taken daily, and again whenever the roles option is
written — so a change is captured as it happens, not the next morning. - Nothing is written when the roles are identical to the last snapshot, so the
list stays readable. - A snapshot that follows a disappearance is marked as such and shown
first: that is the one you will want. - Restoring is additive by default: only the roles missing from the site
are put back. Nothing existing is overwritten unless you explicitly ask for a
full restore. - A snapshot from another installation is refused, matched on the table
prefix and option name, so a file copied between sites cannot wreck the roles
of the wrong one.
Retention that does not defeat itself
Snapshots are capped — thirty daily, thirty on change — but the best recent one
is kept on top of that quota. Without this, a run of repeated disappearances
would rotate the retention until no copy held the lost roles any more: the
safety net would quietly empty itself at exactly the moment it was needed.
Where snapshots are stored
Under wp-content/ubac-role-backups/, not in the uploads directory, which is
served by the web server and swept up by synchronisation tools. Both an
.htaccess and an index.php are placed there. On a host where wp-content/
is read-only, the plugin falls back to the uploads directory rather than
failing silently, and the location is filterable.
WP-CLI
wp ubac-role-backup list
wp ubac-role-backup snapshot
wp ubac-role-backup diff <file>
wp ubac-role-backup restore <file> [--full]
External services
This plugin does not contact any external service. Snapshots stay on your own
server.