Home > Help Center > Applications > WordPress > Import WordPress Multisite with Subdomain URL

Import WordPress Multisite with Subdomain URL

In a separate article, we showed you how to import WordPress Multisite with sub-directory URL.

Most of the actions, described in that article, are also valid for this case, but of course there is one significant difference that we'll explain in detail here.

A multi-site network with sub-directory URL needs only one configured site domain for all sites to work because the individual URLs differ only by the keyword after site domain:

http://subdomain.example.com/site1

http://subdomain.example.com/site2

From a DNS point of view, we need to configure only one site domain and all sites from the entire multi-site network will use this site domain.

The multi-site network with sub-domain URL needs a configured subdomain for each site even if there are hundreds of sites.

http://site1.subdomain.example.com

http://site2.subdomain.example.com

Fortunately there is a technical solution that relieves us from manually configuring a subdomain every time we add a new site to the network and this solution is called wildcard DNS record.

So first we will configure a primary site domain and then we will configure a wildcard record for all subdomains so that DNS can correctly target the requests for each subdomain to the corresponding virtual site on the network.

As we said it earlier you can follow these tutorials using separate domain (addon domain) or sub-domain as a site domain.

Here we will repeat the full list of necessary actions as well as the correct order in which they should be accomplished.

  1. Download files via FTP to the local computer;
  2. Export a MySQL database archive from the remote server via phpMyAdmin to the local computer;
  3. Create and Configure site domain in cPanel;
  4. NEW! Create and configure a wildcard DNS record for subdomains in cPanel;
  5. Create a new MySQL database in cPanel;
  6. Edit the wp-config.php file on the local computer;
  7. Edit the content of MySQL archive on the local computer;
  8. Import the multi-site files into the site's directory via FTP;
  9. Import the MySQL archive from the local computer into the new MySQL database;

We remind you that the sequence of actions is important because, you can not upload the files via FTP, if you have not configured the site domain.

Also, you can not edit the database archive before you have generated and downloaded this archive to your local computer.

In this article, we'll show how to execute the different step four from the above list.

Configure a wildcard DNS record for subdomains in cPanel

We assume that step three was executed properly and the domain of the main site on the network is configured correctly.

Now we open cPanel > Domains > Subdomains again to configure thr wildcard record that will configure all subdomains of site domain (wpmuimport.example.com) to the site directory (wpmuimport):

Access Subdomains in cPanel

Click Domains > Advanced Zone Editor to make sure the DNS records are properly configured:

Open Advanced Zone Editor in cPanel

Select domain – in our case wpmuimport.example.com

Select site's domain

If you are following this tutorial using addon domain for the main network site, these records will look like this way:

example.com 14400 IN A 11.22.33.44

*.example.com 14400 IN A 11.22.33.44

Wildcard record makes it possible for us to create unlimited number of sites with any keyword in front of the site domain without having to manually configure a subdomain for each site on our network.

To finish multi-site import, you must complete all next steps exactly as described in the import multisite with subdirectory url article.

Once all the steps have been completed correctly, we need to test our network of sites:

Network of WordPress multisites

Test admin panel login, add another site, create new Pages and Posts …

Congratulations, your multisite network with subdomain URLs works just fine.

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support