Change Multisite Primary Domain

Multisite is a powerful tool for hosting many WordPress websites under the same domain. Changing the primary domain of a WordPress multisite requires updates in several locations. You will need access to the database and SFTP for your site before proceeding.
There are also a few items to be aware of when changing these values.

  • Consistently use your Primary domain when updating these values.
    • Do not switch between www and non-www versions.
  • Some locations are noted as requiring HTTP or HTTPS protocol, so review these carefully.

Update Database

Click the table name on the left and look for the option_value specified.
Simply click the current option value to update and hit Enter or Return to save.

NOTE: If your site uses a custom database prefix, this will affect the table names listed below. If this is the case then replace wp_ with your prefix in the following table names.

  1. wp_options
    • Option values:
      1. siteurl
      2. home
    • Must include HTTP or HTTPS
  2. wp_site
  3. wp_sitemeta
    • Option value: siteurl
    • Must include HTTP or HTTPS
    • Must include a trailing slash
  4. wp_blogs
    • Option value: Every value in the domain column should be updated to the new domain
  5. wp_#_options (situational)
    • Option values: siteurl and home
    • Each subsite has a set of database tables with a number added to the prefix. There may be several tables or there may be no additional tables, it will vary by how many subsites you’ve already added.

Update wp-config.php

    1. Connect to your site using SFTP
    2. Download the wp-config.php file, located in your site’s root directory
    3. Update the following line to your Primary Domain:
      • define( ‘DOMAIN_CURRENT_SITE’, ‘newdomain.com’ );
    4. Save and upload the modified file, overwriting the original.

NOTE: If you see the following lines, remove or comment them out. They will overwrite your database defines in some areas and cause issues:

define( 'WP_HOME', 'http://somedomain.com' );
define( 'WP_SITEURL', 'http://somedomain.com' );

NEXT STEP: How to add map subsite domains in a multisite

Still need help? Contact support!

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to your account to get expert one-on-one help.

The best in WordPress hosting.

See why more customers prefer WP Engine over the competition.