Skip to main content

How Do I Publish a Multisite?

Guide on how to publish WordPress multisite and subsite.

Publishing a multisite differs from the publishing of a normal site in certain ways. Unlike the standard process, it is advisable to change the addresses in the multisite database manually in advance using search-replace. In addition to this, the address must also be changed in the wp-config.php file, which is located on the server at the path /data/wordpress/htdocs/.

This file contains a number of multisite-related definitions, one of which is the site's primary address. The line you want to edit is the following:

define( 'DOMAIN_CURRENT_SITE', 'example.fi-c.seravo.com' );

Change the development address to the final primary domain for the site and save the changes. After these changes, the site will no longer be accessible via the browser until the primary domain has been pointed to our server and the DNS has had time to update. Despite this, it is still recommended to point the DNS after making the changes, as this allows our publishing automation to automatically generate the certificate and keeps the downtime associated with publication as small as possible.

If the domain starts point to our server before the addresses are changed in the database and the wp-config.php file, it will lead to the site being non-functional until both changes have been made.

How Do I Publish a Subsite?

In network admin change the development address to the final domain for the subsite and save the changes. To change subsite domain you need to define this in site address, siteurl and home that can be found in info and settings tabs while editing site information fields: (example.com/wp-admin/network/sites.php > Edit)

It is recommended to also change site address in the database with following search & replace command:

wp search-replace 'newsite.example.com' 'newsite.com' --all-tables

After these changes, the site will no longer be accessible via the browser until the domain has been pointed to our server and the DNS has had time to update.

Lastly define site attribute as public by going to info > attributes while editing subsite information.

Did this answer your question?