Bobcares

How to get WordPress multisite subdomains work for your business

by | Jul 7, 2017

A major feature of WordPress that makes it popular among website owners, is its ability to run multiple WordPress sites from a single installation in an account. For webhosts who offer WordPress hosting, we implement this feature for them.

This WordPress multisite feature also helps to manage subdomains easily for a reseller or other business owners who handle multiple ventures. But, if not setup right, these multisite subdomains will not work fine.

See how we help web hosting companies

By default, the new subdomains setup in the WP multisite system are created as either subdomains (e.g. sudomain.domain.com) or subfolders (e.g. domain.com/subdomain).

To make these subdomains look like individual domains, we configure domain mapping, so that visitors would feel its a unique website. WP multisite feature thus provides the following benefits to business owners:

  • They can easily install and manage multiple WordPress blogs from one dashboard.
  • Super Admin can access all the blogs and can manage their settings and features easily.
  • Site owners need to update WordPress, a plugin or theme only once for all the sites within the network.

Here, we’ll see how to setup domain mapping and get WP multi-site work for your business.

How to enable WordPress multisite subdomains

Before we begin, you need to choose a domain name that will serve as the root domain name for all your customers, say domain.com. Install the latest version of WordPress on the document root of domain.com.

Make sure that mod_rewrite is working on this domain. To enable multi site network, add this entry to wp-config.php:

define( 'WP_ALLOW_MULTISITE', true );

Go to “Tools” –> “Network Setup” in the WordPress admin area. Choose “Sub-domains” option, fill in your site details, and click on “Install”. A list of settings to be put in wp-config.php and .htaccess will be shown in the next screen.

a. Put the displayed wp-config.php settings above the line /* That’s all, stop editing! Happy blogging. */.
b. Put the .htaccess settings displayed on the screen in place of any old WordPress related entries in your .htaccess file.

Now re-login to the WordPress admin area, and you can choose the “Network Admin” mode by going to “My Sites” in the top-left corner.

[ Don’t lose your sleep over server issues. Keep your customers happy with the best support specialists. ]

How to configure domain mapping for WordPress multisite subdomains

As Network Admin, install the plugin WordPress MU Domain Mapping. Once it’s installed, copy the file “sunrise.php” from the new plugin folder and put it under “wp-content”.

Now, put the below entry in wp-config.php above the line /* That’s all, stop editing! Happy blogging. */.

define( 'SUNRISE', 'on' );

Go to Settings –> Domain Mapping, and enable the settings below:

wordpress-multisite-wpmu-options

Configuration screen in Domain Mapping plugin

 

Wildcard subdomains are needed to point your customers’ domains to your multisite WordPress. To enable wildcard subdomains, settings have to be made in Apache web server and BIND DNS server.

In the Apache configuration for domain.com, under the “ServerName” line I added a “ServerAlias” entry as shown below:

<VirtualHost IPaddress:80>
 ServerName domain.com
 ServerAlias *.domain.com . . . </VirtualHost>

 

In the zone file for domain.com, add the wild-card DNS entry as shown below:

*.domain.com.     14400   IN      A       IPaddress

Once the configuration is updated, restart both services. Your WordPress is now ready to host new domain names in the same installation.

How to add domains to your WordPress multisite network

To add a subdomain (subdomain.domain.com) to the WordPress multisite setup and to map it to a unique domain name (subdomain.com), first add entries for subdomain.com in the relevant DNS zone file and Apache config files.

Then enable domain mapping in WordPress MU for the new subdomain.com, with these steps:

Go to “Sites” –> “Add New” in WordPress admin area as shown below. Fill in the “Site Address”, “Site Title” and “Add Site”.

add new site in wordpress multisite

Now head to “Sites” –> “All Sites” and hover your mouse pointer over “subdomain.com”. You’ll see a URL like the one below:

http://domain.com/wp-admin/network/site-info.php?id=43

Note the number assigned to “id” (here it’s 43). Then go to “Settings” –> “Domains”. Enter the number above in the field “Site ID”, and the new domain  in the “Domain” field. Click “Save”.

 

domain-mapping-wordpress-multisite

 

Once you have completed the equivalent configuration in your server, try taking the newly configured subdomain website and it should work fine. Now you can keep adding more sites.

What can go wrong in WordPress multisite subdomain setup

Very often we’ve got website owners contacting us for various issues in this multisite setup, such as:

  1. WordPress subdomains not loading
  2. Error enabling the network
  3. Domain mapping not working fine
  4. Uploaded files not loading

The reasons for these issues can vary from from one to another – Rewrite module error, SiteURL incorrect, Domain mapping plugin issues, Network configuration errors, DNS and Apache settings incorrect, Permission issue, etc.

WordPress multisite setup has a risk factor that if one installation is affected or hacked, then all the blogs in the network will be hacked too. To avoid that, strict security and monitoring of the setup is very vital.

With our years of expertise setting up and managing WordPress sites, along with hands-on experience developing multiple key plugins for WordPress, Bobcares engineers know all the WP issues inside out and thus resolve them in no time.

[ Focus on your core business without interruptions. Our tech support experts are here to manage your customers 24/7. ]

At Bobcares, our 24/7 server specialists constantly monitor all the services in the server and proactively audit the server for any errors or corruption in them.

With our systematic debugging approach for service or other software errors, we have been able to provide an exciting support experience to the customers.

If you would like to know how to avoid downtime for your customers due to errors or other service failures, we would be happy to talk to you.

 

GET 24 HOURS PHONE SUPPORT SERVICES

Use Bobcares for your phone support services. Ensure 24/7 coverage for your customers!

CONTACT US FOR 24/7 PHONE SUPPORT PLANS

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.