Wordpress multisite with different domain

I'm new in the WordPress world and I've created WordPress multi site. I want to set different domain for my child sites.

Lets say my main site is www.myMainSite.com and my child is www.mySonSite.com.

I already changed the site URL (In WordPress config) to the new domain (instead of the default sub-domain) but it seems that the link is broken. I know that I need to change some configuration in my server but I didn't mange to do so. I use c-panel.

So what do I need to to to link the new domain to my child site? Thanks in advance.

Topic dns domain-mapping multisite Wordpress

Category Web


I believe that you have to go to the Network Admin (the 'master' admin), then Sites, then mouse over the site you wish to change, select Edit. So the process is not done from the sub-site's Dashboard, but from the Network Admin dashboard.

You may need to go into the Settings tab on the edit page to change other URLs, depending on settings that plugins or themes have made. Just carefully change the https://www.example.com/subsite1 to https://www.customdomain.com as needed.

A good backup of the database is always a good idea before doing that.

Once you make the Settings changes, then you'll need to change the newdomain.com's Nameserver settings to point to the correct place. If you have hosting, then the Control Panel Add-on Domains is where you want to go (depending on the host). The host supporting place can assist you with this.


You shouldn't need to change the site URL in the WordPress config. You should be able to just tell the new site that its URL is mysonsite.com.

Here's how you would do it:

  1. Create a new site in your Multisite installation. If you're using subdomains, this would probably default to mysonsite.mymainsite.com; if you're using subfolders, it'd be mymainsite.com/mysonsite.
  2. Go to the new site's dashboard, mouse over the site's name in the admin bar at the top of the page, and select Edit Site.
  3. Change the Site Address (URL) to www.mysonsite.com, and save the changes.

Note: You'll need to make sure that your DNS entry for www.mysonsite.com points to the same IP address as www.mymainsite.com, and that your web server's config knows that mymainsite.com and mysonsite.com go to the same WordPress installation. (In Apache, for example, you might have something like this in your config file:

ServerName mymainsite.com
ServerAlias www.mymainsite.com
ServerAlias mysonsite.com
ServerAlias www.mysonsite.com

...but different web servers have different configuration syntaxes, and server config is beyond the scope of this site.)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.