How to use WordPress Multisite with different domain names?

Posted by Prem Tiwari | Updated on

If you want to use WordPress Multisite with different domain names? There seems to always be a bit on confusion on this topic. Perhaps WordPress could do a better job guiding it’s users in this process. Although, I suppose Multi-site wasn’t intended to be used for TLD’s.

So first of all, I would install WordPress, setup multisite, and configure it as a subdomain network configuration.

Step 1. Here’s a sample configuration for your wp-config.php file in the base directory of your WordPress installation:

Step 2.Then, here’s the basic configuration for your .htaccess file as a subdomain configuration, in the base directory of your WordPress installation:

Step 3.Now in order to get TLD’s to work properly, I’ve had to make some additional configurations to the wp-config.php file like this:

That’s it with the WordPress specific configurations.

Personally, I like to have one Apache Virtual Host for the primary domain in the network and then configure that virtual host with alias domains. Each alias domain being one of the additional sites in your network.

However you end up tweaking your setup, you need each domain’s DNS to resolve to the same web server, and each domain to be pointed to the same directory the primary domain is installed with WordPress. Each domain in your network needs to point to the same web server with DNS records and share the same directory path for the files used by WordPress.

Once you’ve got everything configured and setup properly as discussed above. Log into your WordPress administration area and navigate to the Network administration area to add a new site into your network.

When you go to add a site, it will enforce you to add the website as if it were a sub domain under your primary domain. Just roll with it. Enter something temporary.

Once the site has been added, then go find it under the list of sites in your network. Click edit on that specific site. Now, you can fully 100% change the domain name of that website. That’s when you would put the actual domain name for this TLD site.

I know it’s a bit of trickery to do it that way, but it works and you don’t need to use any plugins.

Reference:https://wordpress.stackexchange.com/questions/251116/how-to-use-wordpress-multisite-with-different-domain-names


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers