Knowledge Base

How to Add or Change the Domain of a WordPress Multisite

Category: Tutorials | Last modified: September 17, 2022

When using a WordPress Multisite and adding or changing domains, there are a few additional steps involved. These same steps would need to be followed anytime you wish to change the primary domain of your WordPress Multisite.

Step 1: Adding the domain to your site on Pressable

After pointing the domain to Pressable, you can add it to your site on Pressable via the My Pressable Control Panel, under the “Domains” tab, as shown below:

Step 2: Updating domain in the wp-config.php file

This would require logging into your site via SFTP. In the site root (/htdocs) you will find the file wp-config.php.

Edit this file to update this line under the multisite setup as shown below. Replace multisitetest.com  with the (primary) domain that you wish to add to your site.

define('DOMAIN_CURRENT_SITE', 'multisitetest.com');

Step 3: Updating the URL in the Database

This requires updating the URL in a few tables via PHPMyAdmin which can be accessed through the Database tab on your My Pressable Control Panel. The domain field in all the rows needs to be updated to be the new domain. In this case multisitetest.com.

This change will need to be made in the following tables:

  • wp_options
  • wp_blogs
  • wp_site
  • wp_sitemeta
  • wp_#_options

After making changes to the database, it is important to Flush the Object Cache. This can be done from the MPCP, under the Performance tab:

That’s all there is to it!

If you’re having trouble with any of these steps or have additional questions, contact support at help@pressable.com.

Note:
When you are cloning a Multisite, these same steps would need to be followed as the primary domain would change.