WordPress Multisite Network Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Setting Up WordPress Multisite for Site Networks

WordPress Multisite (WPMS) allows managing multiple sites from one WordPress installation with unified database, shared code, and centralized plugin/theme management. This isn't "multiple sites on one server"—it's one WordPress with shared infrastructure. Suitable for media networks, multiregional projects, WordPress SaaS platforms, educational portals. Basic network setup takes 1–2 days; production setup with data isolation and custom plugins takes from 5 days.

Enabling Multisite

Multisite is activated by adding a constant to wp-config.php before setup:

define('WP_ALLOW_MULTISITE', true);

After navigating to Tools → Network Setup, choose addressing type:

  • Subdomains (site1.example.com, site2.example.com) — requires wildcard DNS and SSL
  • Subdirectories (example.com/site1, example.com/site2) — simpler setup

WordPress generates code for wp-config.php and .htaccess (or nginx.conf). Example for nginx with subdomains:

server {
    listen 443 ssl;
    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;

    root /var/www/html;
    index index.php;

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

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

Wildcard SSL for *.example.com—via Let's Encrypt with DNS-01 challenge:

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

Database Table Structure

Multisite creates prefixed tables for each subsite. Main site uses wp_posts, second uses wp_2_posts, third uses wp_3_posts:

wp_blogs         -- site registry
wp_sitemeta      -- network metadata
wp_users         -- shared users (one registry)
wp_usermeta      -- roles stored per-site

-- First site tables
wp_posts, wp_postmeta, wp_options...

-- Second site tables
wp_2_posts, wp_2_postmeta, wp_2_options...

Users are shared, but roles are different for each subsite. User can be editor on site2 and subscriber on site3.

Programmatic Subsite Creation

$blog_id = wpmu_create_blog(
    'newsite.example.com',
    '/',
    'New Site',
    get_current_user_id(),
    ['public' => 1],
    1
);

if (is_wp_error($blog_id)) {
    error_log('Site creation error: ' . $blog_id->get_error_message());
    return;
}

switch_to_blog($blog_id);
update_option('blogdescription', 'New site description');
restore_current_blog();

Custom Domain for Subsite

Domain mapping—attaching third-party domain (client-site.ru) to a Multisite subsite. Native with WordPress 4.5+:

// In wp-config.php
define('COOKIE_DOMAIN', '');

// Via WP CLI
wp --url=site2.example.com option update siteurl 'https://client-site.ru'
wp --url=site2.example.com option update home 'https://client-site.ru'

Add nginx:

server {
    listen 443 ssl;
    server_name client-site.ru www.client-site.ru;
    root /var/www/html;
    # same location blocks as main server
}

Network Plugins and Themes

Plugin activated at network level works on all subsites. Plugin activated on specific subsite works only there.

if (is_multisite()) {
    $network_sites = get_sites(['number' => 100]);
    foreach ($network_sites as $site) {
        switch_to_blog($site->blog_id);
        // operation for each site
        restore_current_blog();
    }
}

Content Isolation Between Subsites

Media files are isolated by default: wp-content/uploads/sites/2/, wp-content/uploads/sites/3/. This is secure but complicates resource sharing.

For shared media library—use "Network Media Library" plugin or custom solution.

Scaling and Limitations

Multisite works well up to 50–100 active subsites on one server. Beyond that, degradation starts due to wp_options table and global cache. Signs: slow switch_to_blog, long REST API response.

Solutions: Redis Object Cache with proper key segregation per blog_id, horizontal scaling via Varnish, separate databases per subsite (via HyperDB).

Typical timelines: basic setup of 3–5 subsites—2–3 days. Setup with domain mapping, SSL, network plugins, custom registrar—5–8 days.