Knowledge Base

Adding or changing the domain on a WordPress Multisite

Category: Tutorials | Last modified: May 26, 2021

When adding a domain to a WordPress Multisite, 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 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:

A screenshot of the MyPressable Control Panel, with the following configurations: CDN settings: Toggle to the right, indicating On. Description: When your site is ready, enable the advanced server caching and CDN System which will speed up your site. Button: Purge. Object Cache. Caution: Flushing object cache can result in slower page speed. Description: Flush site object cache of database queries and temporary data stored for requests. Button: Flush.

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.

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

An Automattic Invention A family of WordPress solutions.