What is WordPress Multisite?
WordPress Multisite lets you manage multiple websites from a single WordPress installation. Each site shares the same core files but has its own content, themes, and plugins.
Prerequisites
- Fresh WordPress installation or existing site
- Access to wp-config.php file
- Ability to modify server configuration files
- Basic understanding of WordPress administration
Step-by-Step Setup Guide
1. Enable WP_ALLOW_MULTISITE
Add this line to wp-config.php before the "That's all, stop editing!" comment:
define( 'WP_ALLOW_MULTISITE', true );
2. Configure Network Settings
- Log in to WordPress admin
- Go to Tools → Network Setup
- Choose between subdirectories or subdomains
- Enter network details (title, admin email)
3. Update Configuration Files
After the network setup, WordPress will provide two code snippets:
Add this to wp-config.php:
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false ); // true for subdomains
define( 'DOMAIN_CURRENT_SITE', 'example.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Update .htaccess for Apache servers:
RewriteEngine On
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]
Best Practices
-
Choose URL structure wisely:
- Subdomains: site1.example.com
- Subdirectories: example.com/site1
-
Plan your network structure before setup
-
Regularly backup your network
-
Use network-compatible themes and plugins
Security Considerations
- Limit super admin access
- Use strong passwords
- Implement SSL across all sites
- Regular updates for core, themes, and plugins
- Monitor network-wide user permissions
Common Pitfalls
- Not testing in a staging environment first
- Choosing wrong URL structure
- Installing incompatible plugins
- Insufficient server resources
- Not configuring proper backups
Useful Plugins
-
Network Plugin Auditor
- Tracks plugin usage across your network
-
NS Cloner
- Easily clone sites within your network
-
User Switching
- Switch between user accounts in multisite
Server Requirements
- Memory limit: 256M minimum
- PHP version: 7.4 or higher
- MySQL/MariaDB with InnoDB support
- Apache or Nginx with proper configurations
Troubleshooting Tips
- Check error logs
- Verify file permissions
- Test with default theme
- Disable all plugins temporarily
- Confirm server meets requirements
Remember to always backup your site before enabling multisite, as the process cannot be easily reversed without a fresh installation.