Skip to content

Manually launch a site on a multisite

VIP’s site launch tool is the recommended method for launching sites on a WordPress multisite.

Launching a site is also possible by completing the necessary VIP-CLI commands and updates to the WordPress Network Admin that are outlined below.

Prerequisites

1. Change the site URL

  • Log in to the main site (ID 1) of the multisite.
  • Hover over the “My Sites” label in the upper left hand corner of the WordPress Admin dashboard to access the flyout menu and select:
    My Sites > Network Admin > Sites
  • On the “Sites” page of your multisite Network Admin, hover over the site you plan to launch and select the “Edit“ link.
  • Select the “Info” tab.
  • Update the Site Address (URL) to the final production URL to match the domain that was mapped in the Prepare for launch steps.
  • Select “Save Changes.”

Note

Updating the Site Address (URL) will also update the home and siteurl values, as well as the entry in wp_blogs.

In this screenshot example, the Site Address has been updated to the final production URL “https://www.mysite.com”.

2. Dry-run search-replace from current URL to production URL

VIP-CLI command examples

For demonstration purposes, the <app-alias> value mytestsite and the <env> value production are used in the VIP-CLI command examples below. Read more about how to target environments in VIP-CLI commands.

Target search-replace on tables specific to the site

The search-replace operation will update the URLs (including content and media URLs) that exist in the site’s database from the VIP convenience domain to the mapped production domain. Running the search-replace command first with the --dry-run flag will report the qualifying changes without altering the database.

vip @mytestsite.production -- wp search-replace mysite.go-vip.net/site www.mysite.com --all-tables-with-prefix --report-changed-only --url=www.mysite.com --dry-run

Caution

The above command performs a targeted search-replace within the site tables corresponding to the URL specified (to the value that was updated in the previous step). Verify that the output shows only the tables prefixed with the correct site ID, for example wp_2_posts.

Run search-replace on all tables of the multisite

To perform a search-replace across all tables of the multisite, adjust the command as follows:

vip @mytestsite.production -- wp search-replace mysite.go-vip.net/site www.mysite.com --all-tables --report-changed-only --dry-run

Caution

Depending on the size of the database, a search-replace across the entire database may take a long time to complete and add extra load. Contact VIP support if you need to run a search-replace across the entire database and have further questions.

3. Run final search-replace

An example of the search-replace command that updates the current URL to production URL by removing the dry run argument:

vip @mytestsite.production -- wp search-replace mysite.go-vip.net/site mysite.com --all-tables-with-prefix --report-changed-only --url=www.mysite.com

4. Flush object cache

vip @mytestsite.production -- wp cache flush --url=www.mysite.com

5. Complete the launch

Finish the site launch by following the detailed completing a site launch guide.

Last updated: July 19, 2022