WordPress Multisite transforms a single WordPress installation into a network of sites sharing the same core files, themes, and plugins. Whether you're managing multiple client sites, building a SaaS platform, or running a network of related blogs, Multisite offers centralized administration and efficient resource usage. This guide walks through the complete setup process from prerequisites to production-ready configuration.
Prerequisites and Planning
Before enabling Multisite, verify your environment meets the technical requirements and choose your network structure.
Hosting Requirements
WordPress Multisite works on most hosting environments, but confirm:
- Fresh or existing WordPress installation (existing sites require migration planning)
- PHP memory limit of at least 128MB, preferably 256MB for network admin functions
- Database access with privileges to create tables (the same database works fine)
- Mod_rewrite enabled (Apache) or proper rewrite rules (Nginx)
- Wildcard DNS if using subdomain mode
- Wildcard SSL certificate if using HTTPS with subdomains
Subdomain vs Subdirectory Structure
Choose your network structure before installation:
Subdomain mode (site1.example.com, site2.example.com):
- Each site gets its own subdomain
- Requires wildcard DNS (*.example.com pointing to your server)
- Requires wildcard SSL certificate for HTTPS
- Cannot be changed after setup without reinstallation
Subdirectory mode (example.com/site1, example.com/site2):
- Sites live in paths under the main domain
- Simpler DNS configuration (single A record)
- Standard SSL certificate works
- Limited domain mapping flexibility
- Not available if WordPress is installed in a subdirectory
For most use cases, subdirectory mode offers simpler initial setup, while subdomain mode provides cleaner site separation and easier custom domain mapping.
Step 1: Back Up Your Installation
Enabling Multisite modifies core configuration files. Create backups before proceeding.
Database Backup
mysqldump -u username -p database_name > backup_$(date +%F).sql
File Backup
tar -czf wordpress_backup_$(date +%F).tar.gz /path/to/wordpress/
Store backups outside your web root or download them to local storage.
Step 2: Deactivate All Plugins
Multisite network activation requires all plugins to be deactivated. Through WordPress admin, navigate to Plugins > Installed Plugins, select all plugins, choose Deactivate from the bulk actions dropdown, and click Apply.
Alternatively, via SSH:
cd /path/to/wordpress
wp plugin deactivate --all
Plugins can be reactivated after network setup completes.
Step 3: Enable Multisite in wp-config.php
Edit wp-config.php in your WordPress root directory. Add this line above the /* That's all, stop editing! */ comment:
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
Save the file and refresh your WordPress admin. A new Network Setup option appears under Tools.
Step 4: Run the Network Setup Wizard
Navigate to Tools > Network Setup in WordPress admin.
Choose Your Network Structure
The wizard presents subdomain or subdirectory options. If WordPress is installed in a subdirectory or has been running for more than a month, subdomain mode may be your only option.
Enter Network Details
- Network Title: The name for your entire network (can be changed later)
- Network Admin Email: Receives network-wide notifications
Click Install to generate configuration code.
Step 5: Update Configuration Files
WordPress provides two blocks of code to add to your configuration files.
Update wp-config.php
Add the generated code to wp-config.php above the /* That's all, stop editing! */ line. The code looks similar to:
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);
Update .htaccess (Apache)
For Apache servers, replace the existing WordPress rewrite rules in .htaccess with the generated code:
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
Configure Nginx Rewrite Rules
For Nginx servers, add these rules to your site configuration inside the server block:
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
Reload Nginx after making changes:
sudo nginx -t && sudo systemctl reload nginx
Step 6: Log In to Network Admin
After saving configuration changes, log out and log back in. You now have access to the Network Admin dashboard, separate from individual site admin panels.
Access Network Admin through:
- The My Sites > Network Admin menu in the admin bar
- Direct URL: example.com/wp-admin/network/
Step 7: Configure Network Settings
Navigate to Network Admin > Settings to configure network-wide options.
Registration Settings
- Allow new registrations: Control whether users can create new sites
- Registration notification: Choose whether to email network admin about new sites
- Add New Users: Enable or disable user registration
- Limited Email Registrations: Restrict registration to specific email domains
- Banned Names: Prevent certain usernames or site names
Upload Settings
- Site upload space: Set storage quota per site (in MB)
- Upload file types: Whitelist file extensions
- Max upload file size: Set maximum file size per upload
Menu Settings
- Enable administration menus: Choose which admin menu items site administrators can access
Step 8: Configure DNS (Subdomain Mode Only)
For subdomain multisite installations, configure wildcard DNS records.
Add Wildcard DNS Record
In your DNS provider's control panel, create an A record:
Type: A
Name: *
Value: Your server IP address
TTL: 3600 (or default)
This routes all subdomains (*.example.com) to your server. DNS propagation typically takes a few minutes to several hours.
Test with:
dig random-test-name.example.com
The response should show your server's IP address.
Step 9: Configure SSL Certificates (Subdomain Mode)
Subdomain multisite requires a wildcard SSL certificate to secure all subdomains under HTTPS.
Obtain Wildcard Certificate
Using Let's Encrypt with Certbot:
sudo certbot certonly --manual --preferred-challenges dns \
-d example.com -d *.example.com
Certbot prompts you to add a DNS TXT record for domain validation. Add the record in your DNS control panel, wait for propagation, then continue.
Configure Web Server for SSL
For Apache, update your virtual host:
<VirtualHost *:443>
ServerName example.com
ServerAlias *.example.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
# ... rest of configuration
</VirtualHost>
For Nginx:
server {
listen 443 ssl http2;
server_name example.com *.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
# ... rest of configuration
}
Reload your web server after configuration changes.
Step 10: Create Your First Network Site
Navigate to Network Admin > Sites > Add New.
Enter: - Site Address: The subdomain or subdirectory slug - Site Title: Display name for the site - Admin Email: Email address of the site administrator
Click Add Site. WordPress creates the new site and sends a notification email to the site administrator.
Best Practices for Production Multisite
Network-Activate Essential Plugins
Network-activated plugins run on all sites and cannot be deactivated by individual site admins. Navigate to Network Admin > Plugins and use Network Activate for:
- Security plugins (Wordfence, Sucuri, etc.)
- Backup plugins
- Performance optimization tools
- Any plugin requiring consistent functionality across all sites
Leave optional plugins available for individual site activation.
Configure Appropriate User Roles
Multisite adds the Super Admin role, which has full control over the entire network. Regular Administrator accounts manage only their assigned sites.
Best practices: - Limit Super Admin access to trusted personnel only - Use site-level Administrator accounts for day-to-day site management - Enable two-factor authentication for Super Admin accounts - Audit Super Admin accounts regularly
Optimize Database Performance
Each network site creates its own set of database tables (wp_2_posts, wp_3_posts, etc.). As your network grows:
- Enable object caching (Redis or Memcached)
- Monitor database size and optimize tables regularly
- Consider database-specific optimizations for large networks
- Set up automated database backups
Implement Resource Limits
Prevent individual sites from consuming excessive resources:
// In wp-config.php
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M'); // For admin area
Set per-site upload quotas in Network Admin > Settings > Upload Settings.
Use a CDN
Content Delivery Networks dramatically improve load times for multisite networks:
- Configure a CDN that supports multiple subdomains (Cloudflare, StackPath, KeyCDN)
- For subdirectory multisite, standard CDN integration works normally
- For subdomain multisite, ensure your CDN configuration covers the wildcard domain
Regular Updates and Maintenance
Network-wide updates affect all sites simultaneously:
- Test updates in a staging environment first
- Schedule updates during low-traffic periods
- Maintain a pre-update backup workflow
- Document network-specific customizations that may conflict with updates
- Use
wp core updateandwp plugin update --allfor CLI-based updates
Domain Mapping for Custom Domains
Many network owners want to map custom domains to individual sites (e.g., clientsite.com instead of clientsite.yournetwork.com).
WordPress Multisite supports domain mapping through:
- The built-in domain mapping features (WordPress 4.5+)
- Plugins like WordPress MU Domain Mapping for older installs
Configure via Network Admin > Sites > Edit Site > Settings and add the custom domain. Update DNS for the custom domain to point to your server's IP address.
Troubleshooting Common Issues
Login Redirect Loops
Caused by incorrect domain or path constants. Verify in wp-config.php:
define('DOMAIN_CURRENT_SITE', 'example.com'); // No http://, no trailing slash
define('PATH_CURRENT_SITE', '/'); // Include trailing slash
Clear browser cookies and try again.
404 Errors on New Sites
Rewrite rules not properly configured. For Apache, verify .htaccess permissions and content. For Nginx, confirm rewrite rules are in the correct location block and the configuration has been reloaded.
Subdomain Sites Not Resolving
DNS wildcard record missing or not propagated. Test with:
nslookup newsite.example.com
If it doesn't resolve to your server IP, check your DNS configuration.
Plugin Conflicts
Some plugins aren't multisite-compatible. Test plugins on a non-production site before network activation. Check plugin documentation for multisite compatibility notes.
File Upload Issues
Verify upload directory permissions:
chmod 755 /path/to/wordpress/wp-content/uploads
chown -R www-data:www-data /path/to/wordpress/wp-content/uploads
Check PHP upload limits in php.ini:
upload_max_filesize = 64M
post_max_size = 64M
Conclusion
WordPress Multisite provides powerful centralized management for multiple WordPress sites, reducing maintenance overhead while maintaining individual site independence. Success requires careful planning of your network structure, proper server configuration, and adherence to best practices for security, performance, and updates. Start with a solid foundation following this guide, test thoroughly in staging, and scale your network confidently knowing the core infrastructure is production-ready. Whether managing client portfolios, building SaaS applications, or running content networks, Multisite offers the flexibility and efficiency modern WordPress deployments demand.
