What is WordPress Multisite?
WordPress Multisite allows running multiple websites within a single WordPress installation, sharing:
- The same core files
- The same database (with different table prefixes)
- A unified user system
- Centralized theme and plugin management
Use Cases
Suitable for Multisite
- Multi-department corporate websites
- School/University department websites
- Chain brand sub-sites
- SaaS website building platforms
- Multilingual websites (with WPML)
Not Suitable for Multisite
- Completely independent websites
- Websites requiring different plugin configurations
- Highly customized standalone projects
- Websites requiring independent backup/migration
Installation & Configuration
Enabling Multisite
// wp-config.php (add before "That is all")
define("WP_ALLOW_MULTISITE", true);
Network Setup
Visit Tools → Network Setup and choose:
- Subdomain: site1.example.com (requires wildcard DNS)
- Subdirectory: example.com/site1 (simpler)
Adding Configuration Code
// wp-config.php
define("MULTISITE", true);
define("SUBDOMAIN_INSTALL", false); // true for subdomain mode
define("DOMAIN_CURRENT_SITE", "example.com");
define("PATH_CURRENT_SITE", "/");
define("SITE_ID_CURRENT_SITE", 1);
define("BLOG_ID_CURRENT_SITE", 1);
# .htaccess (Subdirectory mode)
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
Network Administration
Adding a New Site
Network Admin → Sites → Add New Site
Required fields:
- Site Address (subdomain or subdirectory)
- Site Title
- Admin Email
User Roles
| Role | Permissions Scope |
|---|---|
| Super Admin | Entire Network |
| Administrator | Single Site |
| Editor/Author, etc. | Single Site |
Theme and Plugin Management
- Network Activate: Available to all sites
- Site Activate: Used by specific sites only
- Only Super Admins can install new themes/plugins
Domain Mapping
Using Independent Domains
Each subsite can use an independent domain:
- Install a domain mapping plugin (built-in support since WordPress 4.5+)
- Add the domain in the site settings
- Configure DNS to point to the server
- Configure SSL certificate
// wp-config.php
define("COOKIE_DOMAIN", "");
define("ADMIN_COOKIE_PATH", "/");
define("COOKIEPATH", "/");
define("SITECOOKIEPATH", "/");
Performance Optimization
Object Caching
Multisite requires object caching even more:
// Using Redis, independent cache per site
define("WP_REDIS_DATABASE", 0); // Main site
// Sub-sites automatically use different databases
Database Optimization
-- Check table sizes per site
SELECT table_name,
ROUND(data_length/1024/1024, 2) as size_mb
FROM information_schema.tables
WHERE table_schema = "wordpress"
ORDER BY data_length DESC;
Upload Directory
// Unified upload directory (optional)
define("UPLOADS", "wp-content/uploads");
Frequently Asked Questions
Q: Subsites are inaccessible?
Check:
- DNS configuration is correct
- Nginx/Apache configuration supports it
- SSL certificate covers all domains
Q: Plugin not appearing on subsite?
- Confirm the plugin is “Network Activated”
- Some plugins do not support Multisite
Q: How to migrate a single site to Multisite?
- Backup the original site
- Install a new Multisite
- Migrate content using import tools
- Update internal links
Q: How to separate a subsite from Multisite?
- Export the subsite content
- Install a standalone WordPress
- Import the content
- Migrate uploaded files
- Update URLs in the database
Recommended Plugins
| Plugin | Purpose |
|---|---|
| User Switching | Quick user switching |
| Multisite Enhancements | Enhanced admin interface |
| NS Cloner | Clone sites |
| WP Multisite (Wenpai Duozhandian) | Multisite subscription platform |
Best Practices
- Plan Ahead: Decide on subdomain or subdirectory mode
- Centralized Management: Use network-level themes and plugins
- Access Control: Assign Super Admin roles appropriately
- Backup Strategy: Backup the entire network uniformly
- Monitor Resources: Watch database and storage growth
For Multisite issues, you can ask for help from @multisite experts!