Skip to content
Back to Blog
WordPress11 min read

Setting Up WordPress Multisite: Configuration and Best Practices

Learn how to enable WordPress Multisite, choose between subdomain and subdirectory structures, configure server rewrites, and manage multiple sites from a single installation.

Written by Abdul AbrorTechnical Hosting Support Engineer
Setting Up WordPress Multisite: Configuration and Best Practices
On this page

WordPress Multisite transforms a single WordPress installation into a network capable of hosting multiple sites. Whether you're managing client sites, running a blog network, or building a SaaS platform, Multisite consolidates administration, updates, and resource management into one system. This guide walks through enabling Multisite, choosing your network structure, configuring server rewrites, and adding sites.

Understanding WordPress Multisite

WordPress Multisite is a core feature that allows you to run multiple WordPress sites from a single installation. Each site in the network has its own database tables for posts, users, and settings, while sharing the same WordPress core files, themes, and plugins. This architecture reduces disk usage, simplifies updates, and centralizes user management.

Common use cases include:

  • Agency client sites managed from one dashboard
  • Educational institutions with department or faculty sites
  • Corporate intranets with team or project subsites
  • Membership platforms where each user gets their own site
  • Multi-language or multi-region content networks

Before proceeding, verify that your hosting environment supports Multisite. Shared hosting plans often restrict the filesystem permissions and server configuration changes required. VPS or dedicated hosting provides full control.

Prerequisites and Planning

Before enabling Multisite, complete these preparation steps:

Backup everything. Create full backups of your WordPress files and database. Multisite configuration modifies core files and database structure.

Fresh install recommended. While you can convert an existing site, starting with a clean WordPress installation avoids migration complications. If converting an existing site, export content first and reimport after network setup.

Verify server access. You'll need: - SSH or SFTP access to edit WordPress core files - Ability to modify web server configuration (Apache .htaccess or Nginx config) - Database access for manual queries if needed - Root or sudo access if configuring Nginx

Plan your network structure. The two options are: - Subdomain: Each site uses a subdomain like site1.example.com, site2.example.com - Subdirectory: Each site uses a path like example.com/site1, example.com/site2

Choose based on these factors:

Factor Subdomain Subdirectory
DNS configuration Requires wildcard A record No DNS changes
SSL certificate Needs wildcard cert Standard cert works
SEO perception Sites appear independent Sites appear related
Plugin compatibility Wider support Some plugins have issues
Existing content Cannot convert if site older than one month Can convert anytime

Subdomain networks are more flexible long-term but require additional DNS and SSL setup. Subdirectory networks are simpler to configure but have path-based limitations.

Configuring DNS for Subdomain Networks

If you chose subdomain structure, configure DNS before enabling Multisite.

Add a wildcard DNS record pointing to your server IP:

*.example.com.  3600  IN  A  203.0.113.45

This tells DNS that any subdomain (anything.example.com) should resolve to your server. Wait for DNS propagation, which typically takes 15 minutes to several hours depending on your DNS provider.

Verify propagation:

dig random-test-name.example.com +short

You should see your server's IP address returned.

For subdirectory networks, no DNS changes are needed. Skip to the next section.

Enabling WordPress Multisite

With backups complete and DNS configured (if using subdomains), enable Multisite in WordPress.

Step 1: Edit wp-config.php

Connect via SFTP or SSH and open wp-config.php in your WordPress root directory. Add this line above the /* That's all, stop editing! */ comment:

define('WP_ALLOW_MULTISITE', true);

Save the file. This enables the Network Setup menu in WordPress admin.

Step 2: Run Network Setup

Log into WordPress admin and navigate to Tools → Network Setup. You'll see the network configuration screen.

Choose your network type: - Select "Sub-domains" or "Sub-directories" based on your earlier planning decision - WordPress may disable one option if you have an existing site older than one month

Configure network details: - Network Title: The name of your network (can be changed later) - Network Admin Email: Receives network-wide notifications

Click Install. WordPress displays two sets of code to add to your configuration files.

Step 3: Update wp-config.php Again

WordPress provides additional configuration lines. Copy them and add to wp-config.php above the /* That's all, stop editing! */ line.

The code looks similar to this (your values will differ):

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

For subdirectory installs, SUBDOMAIN_INSTALL will be false.

Step 4: Configure Server Rewrites

WordPress also provides server rewrite rules. Configuration differs between Apache and Nginx.

Apache Configuration

For Apache servers, WordPress provides .htaccess rules during network setup. Copy the provided code and replace the contents of your .htaccess file in the WordPress root directory.

Standard Multisite .htaccess rules:

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]

These rules route all requests through WordPress, allowing it to determine which site to serve based on the subdomain or path.

Verify Apache modules: Multisite requires mod_rewrite enabled. Check with:

apache2ctl -M | grep rewrite

If missing, enable it:

sudo a2enmod rewrite
sudo systemctl restart apache2

Also verify that your Apache virtual host configuration allows .htaccess overrides:

<Directory /var/www/html>
    AllowOverride All
</Directory>

Nginx Configuration

Nginx doesn't use .htaccess files. You must manually add rewrite rules to your server block configuration.

Open your Nginx configuration file, typically in /etc/nginx/sites-available/example.com.

For subdirectory Multisite:

server {
    listen 80;
    server_name example.com;
    root /var/www/html;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # Handle WordPress admin properly
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
        expires max;
        log_not_found off;
    }
}

For subdomain Multisite:

server {
    listen 80;
    server_name example.com *.example.com;
    root /var/www/html;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
        expires max;
        log_not_found off;
    }
}

Note the server_name directive includes the wildcard *.example.com for subdomain networks.

Test the configuration and reload:

sudo nginx -t
sudo systemctl reload nginx

SSL Certificate Configuration

Secure your Multisite network with SSL certificates.

For subdirectory networks, a standard SSL certificate covering your main domain works for all sites.

For subdomain networks, you need a wildcard certificate covering *.example.com. Let's Encrypt provides free wildcard certificates.

Request a wildcard certificate with Certbot:

sudo certbot certonly --manual --preferred-challenges dns -d example.com -d *.example.com

Certbot will ask you to create a DNS TXT record to verify domain ownership. Add the TXT record at your DNS provider, wait a few minutes, then continue the verification.

Once issued, configure your web server to use the certificate. 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
}

server {
    listen 80;
    server_name example.com *.example.com;
    return 301 https://$host$request_uri;
}

Network Administration

After configuration, log back into WordPress. You'll see a new My Sites menu in the admin bar and a Network Admin dashboard.

The Network Admin dashboard includes: - Sites: Manage all sites in the network - Users: Network-wide user administration - Themes: Control which themes are available to sites - Plugins: Network-activate plugins or allow site-level activation - Settings: Network-wide configuration options

Adding New Sites

To create a new site:

  1. Go to My Sites → Network Admin → Sites
  2. Click Add New
  3. Enter: - Site Address: The subdomain or path (without the domain) - Site Title: Display name for the new site - Admin Email: Email of the site administrator
  4. Click Add Site

WordPress creates the site instantly. The specified admin receives an email with login details.

For subdomain sites, verify the subdomain resolves correctly:

dig newsite.example.com +short

It should return your server IP due to the wildcard DNS record.

User Management

Multisite has two user permission levels:

Network Admin (Super Admin): Full control over all sites and network settings. Can access any site's dashboard and modify any content.

Site Admin: Administrative access to assigned sites only. Cannot access Network Admin or other sites.

Add users through Network Admin → Users → Add New. Assign them to specific sites with specific roles (Administrator, Editor, Author, etc.).

To grant Super Admin privileges to a user, edit the user in Network Admin and check "Grant this user super admin privileges for the Network."

Theme and Plugin Management

Network admins control theme and plugin availability:

Themes: By default, site admins cannot install themes. Network admins must: - Upload themes to /wp-content/themes/ - Network-enable themes in Network Admin → Themes - Site admins can then activate enabled themes

Plugins: Similar workflow: - Upload plugins to /wp-content/plugins/ - Network-activate for all sites, or enable for site-level activation - Network-activated plugins run on all sites and cannot be deactivated by site admins

Common Multisite Issues and Solutions

Sites showing 404 errors: Rewrite rules aren't working. Verify: - Apache: .htaccess file is in place and AllowOverride All is set - Nginx: Configuration includes the rewrite rules and was reloaded - Clear browser cache and try a different browser

Subdomain sites not loading: DNS issue. Verify: - Wildcard A record exists and has propagated - No conflicting DNS records for specific subdomains - Server is listening on port 80/443 for all subdomains

Media uploads failing: File permissions problem. Ensure: - Web server user owns /wp-content/uploads/sites/ - Directories have 755 permissions, files have 644

sudo chown -R www-data:www-data /var/www/html/wp-content/uploads
sudo find /var/www/html/wp-content/uploads -type d -exec chmod 755 {} \;
sudo find /var/www/html/wp-content/uploads -type f -exec chmod 644 {} \;

SSL certificate errors on subdomains: Certificate doesn't cover subdomains. Verify: - You have a wildcard certificate installed - Web server configuration points to the correct certificate files - Certificate hasn't expired

Cannot access wp-admin on new sites: Rewrite rules not handling admin URLs. Check that your configuration includes the wp-admin rewrite rule.

Performance Considerations

Multisite networks share resources, which has performance implications:

Database optimization: Each site creates its own table set (wp_2_posts, wp_3_posts, etc.). Large networks may benefit from database tuning: - Increase max_connections in MySQL/MariaDB - Enable query caching if using older MySQL versions - Consider separate database servers at scale

Object caching: Implement Redis or Memcached for persistent object caching. Benefits multiply across multiple sites.

CDN and caching: Tools like Cloudflare work normally with Multisite. Configure page caching at the server level with Nginx FastCGI cache or Apache mod_cache.

File storage: Consider a plugin like WP Offload Media to move uploads to S3 or similar object storage. This prevents filesystem bloat as sites accumulate media.

Resource limits: Monitor PHP memory limits and execution time. Network operations can be resource-intensive. Set these in wp-config.php:

define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');

Conclusion

WordPress Multisite provides powerful centralized management for multiple websites. By understanding the differences between subdomain and subdirectory structures, properly configuring server rewrites, and following network administration best practices, you can efficiently run and maintain a site network of any size. Start with a test environment to familiarize yourself with the Network Admin interface before deploying production Multisite installations. Proper planning, especially around DNS and SSL configuration, prevents common issues and ensures smooth operation for site administrators and visitors alike.