Skip to content

WordPress Multisite

Run a network of WordPress sites as one Avaloi site: pick subdirectory or subdomain, give a subsite its own domain, and copy the whole network to staging and back.

Parts of this feature are still being built. The Not yet section lists them.

WordPress Multisite runs many WordPress sites from one install. The sites share one set of plugins and themes, one database, and one list of users. Avaloi runs a network as one site: one container, one database, one disk, and one visit count. A network takes one site slot of your plan, however many sites it holds. Disk and visits add up across all of them.

Create a network

  1. Open Sites, then Add site, and choose Install WordPress.
  2. On Site options, set WordPress type to Multisite.
  3. On WordPress options, choose the Network type, then Create site.

The network type cannot be changed later without starting over (Reset site installs the network again).

Type Address of a new site Works on the temporary address
Subdirectory (the default) address/blog Yes, from the first minute
Subdomain blog.address No: each site needs a domain of its own

The temporary address has no wildcard name or wildcard certificate (see Temporary domain), so Avaloi cannot serve blog.your-site.avaloi.com. A subdomain network installs, and its main site works. The other sites show Needs a domain until you add a domain for each one. If you want a network that works before you have domains, pick Subdirectory.

What Avaloi sets up

You do not edit .htaccess or wp-config.php. Avaloi writes the network settings (MULTISITE, SUBDOMAIN_INSTALL, DOMAIN_CURRENT_SITE, PATH_CURRENT_SITE, and the two ids), the web server rules for both types, and a cookie rule so a site on its own domain can sign in. New uploads go to wp-content/uploads/sites/N. The older /files/ address of networks made before WordPress 3.5 still works. The object cache keeps the entries of each site apart.

The network card

The Info tab of a network shows a WordPress network card:

  • the network type and the network address;
  • every site, with a link to it and a label: Main site, Reachable, Own domain, Domain on its way, or Needs a domain;
  • Log in to Network Admin, which signs a super administrator in with one click, and Open Network Admin, which opens the page for a normal sign in.

The card reads the list from the server with wp site list. It changes nothing.

Give a site its own domain

In Domains, select Add domain. A network shows Use this domain for: the whole network (a normal domain) or one site. Pick the site, type the domain, and follow the DNS steps as for any domain (see Domains). When the domain is active, WordPress serves that site on it. A network card link Add domain opens this window with the site already chosen.

  • One domain serves one site. A domain for one site is a single plain name: no www pair, no wildcard, and it cannot be primary.
  • The main site takes its address from the network. To move the whole network to your domain, make the domain primary. Every site on the network address follows, and sites with a domain of their own stay where they are.
  • Each domain gets its own certificate. On the Free Cloudflare plan a wildcard domain cannot route a subdomain network, so add one domain per site.
  • If you remove the domain, the site moves back under the network address (/site2/ in a subdirectory network, site2.address in a subdomain network).

Staging, promote, restore, and reset

Every copy of a network moves all of it:

  • The network address changes in wp-config.php, in wp_site, in wp_blogs, in wp_sitemeta, and in the options and content of every site, including serialized values and subdomain names.
  • A site on a custom domain gets an address on the new environment (/shop/ under the staging address, or shop. in front of it). A staging network never uses the custom domains of live.
  • A promote or a restore puts back the custom domains that the target environment has now, so a promote does not take a domain away from live.
  • Search engines are blocked on every site of staging and of every multidev.
  • Live code stays read only. A promote copies the database, never code written on live.

Reset site on a network installs it again in the type you choose.

Plugins and themes

On a network, the Plugins and themes tab adds the network choices to each row's menu:

  • Activate for the network and Deactivate for the network for a plugin. A network plugin shows Active for the network.
  • Enable for the network and Disable for the network for a theme. A theme must be enabled for the network before a site can use it.

Live code is read only: activate on staging, then promote. Deactivating still works on live, because it only changes the database.

Users and super administrators

The User management tab lists every user of the network. A network also has super administrators, who run the Network Admin: every site, plugin, theme, and user. Make super administrator and Remove super administrator are in each user's menu and ask first. Give the right only to people you trust with all of it.

Search and replace, WP-CLI, and the database

  • Search and replace covers the whole network (--network), including wp_blogs and the tables of every site. A dry run is the default. If you replace the network address itself, Avaloi keeps wp-config.php in step so WP-CLI still loads the network.
  • WP-CLI adds --url for the network address on every command, because a network needs it. Add your own --url (for example --url=address/blog) to run a command for one site. These commands are allowed: site list, site create, site archive, site unarchive, site activate, site deactivate, super-admin list, super-admin add, super-admin remove, theme enable --network, and theme disable --network.
  • Database lists the tables of every site (wp_2_posts, wp_3_options, and so on) in one database.
  • Analytics counts visits per address: the network address and each domain of a site are separate rows, and the paths of a subdirectory site show under the network address.
  • Caching keeps a page cache entry per address and path, so two sites never share a page. Clear caches clears all of them.

Limits

A network is one site. Disk space counts the whole container, including the uploads of every site. The database size counts every table of every site. Visits count every request to every address of the network. Your plan's limits apply to the total.

API

  • GET /v1/environments/{id}/network reads the network: type, address, and every site with its state.
  • POST /v1/sites and POST /v1/sites/{id}/reset take multisite_mode (subdirectory or subdomain) with the multisite template.
  • POST /v1/environments/{id}/domains takes subsite_id to map a domain to one site.
  • POST /v1/environments/{id}/plugins/{slug}/activate, .../deactivate, and POST /v1/environments/{id}/themes/{slug}/activate take network: true. POST /v1/environments/{id}/plugins/bulk takes network too.
  • GET /v1/environments/{id}/super-admins lists super administrators, and PUT /v1/environments/{id}/wp-users/{user_id}/super-admin grants or removes the right. It needs confirm: true.
  • POST /v1/environments/{id}/wp-admin-login takes network: true to land in the Network Admin.
  • MCP tools: create_site, get_network, add_domain, manage_plugin, manage_theme, bulk_extensions, set_super_admin.

Not yet

  • A subdomain network cannot use the temporary address for its other sites. It needs a domain for each.
  • Staff support sign-in opens the dashboard of the main site, not the Network Admin.
  • Avaloi does not create or delete the sites of a network for you. Use the Network Admin, or WP-CLI: site create --slug=blog.

Still stuck?

Email [email protected] with your site name and what you tried, or send us a message.