Contents
Multisite - Plugixa Activity Log
On a WordPress multisite network the plugin keeps one log for the whole network, not one per site. Everything else on this page follows from that decision. It is the same in the free and the Pro build.
One log, one set of settings
| What | On a network |
|---|---|
| The events table | One, shared by every site. Each event carries the id of the site it happened on |
| Settings | One set, stored network-wide. Retention, exclusions, access and privacy apply to every site |
| The other tables | One of each: saved views, the notification queue, and the Pro tables |
| The IP location database PRO | One file, in the main site’s uploads folder, serving every site |
A per-site retention rule would let one site’s setting remove another site’s events, which is why there is no such thing. See Settings and Retention.
Who sees what
| Person | Reads | Changes settings |
|---|---|---|
| Network (super) administrator | Events from every site | Yes |
| Administrator of one site | Events from their own site only | No |
| A role listed under Access | Events from the site they are on | No |
Changing settings needs permission to manage network options, not just to manage one site. That covers the Settings, Monitors and Health screens, the event switches, the import and every Pro configuration screen.
The confinement to one site is applied on the server, to the query itself. It is not a filter a site administrator could remove from the address bar:
- the log, the dashboard and the totals count their own site only;
- an event that belongs to another site answers “not found”, so its id cannot even be confirmed to exist;
- a shared saved view written by a network administrator still shows a site administrator their own site only;
- a CSV export PRO and a report PRO contain their own site’s events only, and they see and run only their own site’s report schedules.
See Access.
Events about the network itself
The Site settings monitor records what happens to the network as well as to each site:
| Code | Event |
|---|---|
| 4010 | A site was added to the network |
| 4011 | A site was archived |
| 4012 | A site was unarchived |
| 4013 | A site was deleted from the network |
| 4014 | A user was added to a site |
| 4015 | A user was removed from a site |
The User accounts monitor records a user being made a network super admin (1107) and losing that status (1108). The full list is in Events.
Filtering by site
A network administrator can narrow the log to one site:
| Where | How |
|---|---|
| REST API | site_id=<id> on GET /events |
| WP-CLI | --site_id=<id> on wp activity-log list |
| CSV export PRO | The file has a site_id column |
For a site administrator the parameter changes nothing: the server confines
them to their own site whatever site_id says.
WP-CLI on a network
The CLI sees the whole network. Somebody with a shell can read the database
anyway, so the commands are not confined to one site. Narrow them on purpose
with --site_id=<id>.
Add WP-CLI’s own --url= for a site the plugin is active on, or the command is
not registered:
wp activity-log list --url=https://example.com/shop/ --site_id=3
See WP-CLI.
Deleting the plugin
The delete switch under Settings -> Uninstall is one of the network-wide settings. With it on, deleting the plugin removes the shared tables and the network-wide settings, which is the log of every site at once. With it off, which is the default, deleting the plugin keeps everything. See Settings.
Troubleshooting
| Symptom | Usual cause |
|---|---|
| A site administrator cannot open Settings, Monitors or Health | Those need a network administrator. |
| A site administrator sees fewer events than a network administrator | They see their own site only. |
| A setting changed on one site changed on all of them | Settings are network-wide. There is one set. |
| “‘activity-log’ is not a registered wp command” | --url= is missing, or points at a site the plugin is not active on. |
| A CLI listing shows events from every site | Expected. Add --site_id=<id>. |