Skip to content

Multisite Override Style

Network-wide CSS and theme.json overrides for WordPress Multisite. Enforce brand consistency across all subsites from a single admin panel.

  • CSS Override — CodeMirror editor, appended after all theme stylesheets (priority 9999)
  • theme.json Override — Visual fields (colors, typography, spacing, borders) + raw JSON editor
  • Deep Merge — Values merged into the Global Styles (user) layer via wp_theme_json_data_user
  • Per-Site Exemptions — Network admin can exempt individual sites
  • Revision History — Last 10 saves with one-click restore
  • Preview — Test changes on a live site before saving
  • Import / Export — JSON bundle for dev → staging → production promotion
  • Block Theme Awaretheme.json applies to block themes only; classic themes get CSS only
  • WordPress Multisite 6.8+
  • PHP 8.3+
  • Network activation only
  1. Download the latest multisite-override-style.zip from Releases
  2. Upload via Network Admin → Plugins → Add New → Upload Plugin
  3. Network Activate from Network Admin → Plugins

The plugin includes automatic updates — you’ll see new versions in WordPress like any other plugin.

Terminal window
cd wp-content/plugins
git clone https://github.com/soderlind/multisite-override-style.git
cd multisite-override-style
composer install
npm install && npm run build

Then Network Activate from Network Admin → Plugins.

Navigate to Network Admin → Themes → Override Style.

TabPurpose
CSSRaw CSS editor (CodeMirror)
theme.jsonVisual fields + Raw JSON
SitesPer-site exemption toggles
HistoryRevision list with restore
Import / ExportJSON download/upload
Terminal window
# Start dev server (hot reload)
npm run start
# Production build
npm run build
# Run PHP tests
composer test
# Lint JS
npm run lint:js
├── multisite-override-style.php # Plugin bootstrap
├── src/
│ ├── Plugin.php # Hook wiring
│ ├── Admin/ # Network admin page, REST API, Edit Site screen
│ ├── Override/ # CSS + theme.json injection
│ ├── Preview/ # Transient-backed draft preview
│ └── Storage/ # Settings + Revisions repositories
├── resources/js/
│ ├── index.jsx # React entry
│ ├── api.js # REST client
│ └── components/ # React UI
├── build/ # Compiled assets
├── languages/ # POT file
└── tests/ # PHPUnit + Brain Monkey
HookTypeDescription
wp_theme_json_data_userFilterMerges network theme.json override
wp_enqueue_scripts (9999)ActionEnqueues network CSS override

All endpoints require manage_network capability.

MethodEndpointDescription
GET/wp-json/mos/v1/settingsCurrent CSS, theme.json, exemptions
POST/wp-json/mos/v1/settingsSave settings (creates revision)
GET/wp-json/mos/v1/revisionsList last 10 revisions
POST/wp-json/mos/v1/revisions/{id}/restoreRestore a revision
GET/wp-json/mos/v1/sitesAll sites with exemption status
POST/wp-json/mos/v1/sites/{id}/exemptionToggle exemption
POST/wp-json/mos/v1/previewCreate draft, returns preview URL
DELETE/wp-json/mos/v1/preview/{token}Discard draft
GET/wp-json/mos/v1/exportDownload settings bundle
POST/wp-json/mos/v1/importImport settings bundle

GPL-2.0-or-later

Per Søderlind