multisite-security
Installation
SKILL.md
Multisite security
When to use this skill
Use this skill whenever code runs on a WordPress multisite network:
- Using
switch_to_blog()to access another site's data. - Adding network admin pages (
network_admin_menu). - Enumerating sites with
get_sites(). - Reading a
blog_idfrom a request parameter or URL. - Performing actions that affect the whole network vs. a single site.
On multisite, site administrator and network administrator are different roles.
Network-level actions require manage_network or manage_network_options, and
switch_to_blog() must always be paired with restore_current_blog().
Related: see the capability-permission-checks skill for single-site capability
patterns.