KakapoWP KakapoWP
Log in Secure Lifetime
Help Center/Roles/Exporting the setup, reading it in and distributing it across the network

Exporting the setup, reading it in and distributing it across the network

Gilt für: Kakapo Roles· 4 min read

A permissions setup that cost an hour on one site should not cost another hour on the next. Everything this plugin manages is exported: roles, capabilities, visibility rules and redirects.

What does not come along

  • The licence key. It belongs to this installation and would otherwise stand in clear text in a file that passes through many hands.
  • The assignment of individual users. On the target site it would be pointless — there the user IDs are different.

The two import modes

  • “Add to” leaves existing capabilities standing and adds the missing ones.
  • “Replace” writes the file’s state of roles — whatever was more here moves to the trash.
A file in which the role “administrator” has no “manage_options” is rejected in “replace” mode — after that nobody would get into the admin area any more. A file from a later version is likewise rejected instead of being half read.

Distributing roles across a network

In a multisite the section “Network” keeps the roles of all sites the same. What is distributed is this site’s state of roles onto all the others; the individual sites’ own roles are lost in the process — it is a copy, not a merge. The switch “Distribute automatically on every change” carries the state forward after every creation, change or deletion of a role.

In the network admin the same action stands under “Settings” — there with a list of all sites and their number of roles. It is reserved for super admins: distributing roles across all sites of a network is not a decision that should be taken on a single subsite.

Who changed what, and when

Capabilities change rarely and last long. If half a year later the question comes up who gave the editorial team the right to publish, wp_user_roles is mute — it knows only the present state. The change log records the time, the user, the kind of change and a sentence about it; no IP address, no browser identifier.

Was this article helpful?