WP Staging CLI runs whole WordPress multisite networks locally: blank networks you create yourself, and production multisites restored from a .wpstg backup. Every subsite gets its own local hostname, and the nginx configuration, SSL certificates, and hosts file entries are created in the same run.
Create a Blank Multisite Network
Create a site with WordPress multisite enabled:
wpstaging add mynetwork.local --multisiteFor a subdomain multisite — the shape most production networks use — add the --subdomains flag. You can let WP Staging CLI configure the wildcard setup and add subsites in wp-admin, or pre-fill the subsite hostnames:
wpstaging add mynetwork.local --subdomains
wpstaging add mynetwork.local --subdomains=blog.mynetwork.local,shop.mynetwork.localAdd Subsites Later
When you create subsites inside WordPress, sync their hostnames into the local environment:
wpstaging update-subdomains mynetwork.localThe command reads the subsites from WordPress and updates nginx, the SSL certificate, and the hosts file, so the new subsites open in the browser without any manual configuration. The same applies after a restore that skipped subsites: add them in wp-admin, then sync.
Restore a Production Multisite Backup
A multisite backup is detected during the restore, and every subsite is migrated to its own local hostname:
wpstaging restore mynetwork.local --from=network-backup.wpstgUse --subsite-map when a specific subsite should land on a different local domain — the option can be repeated:
wpstaging restore mynetwork.local --from=network-backup.wpstg --subsite-map=shop.example.com=shop.mynetwork.localSubsites that a restore skips are reported as warnings with the reason, so it is easy to spot which subsites need a manual step.
Work With the Network
- Open the network admin at
https://mynetwork.local/wp-admin/network/, or use a magic link to sign in without a password. - Run WP-CLI network-wide or per subsite:
wpstaging wp mynetwork.local --url=blog.mynetwork.local plugin list. - Subsites added in the WP Staging Desktop app have a Sync Subsites action that runs the same synchronization.
Next Steps
- Restore a WordPress Site From a Backup – restore backups from disk or a URL
- Manage Docker WordPress Sites – manage local Docker sites
- Sign In to wp-admin Without a Password – sign in without a password