BuycPanel Blog

BuycPanel Blog

Latest news and updates

8/20/2014 – cPanel and Subdomains for WordPress Network Sites

Posted by Jamison on 20 08 2014.

WordPress is one of the most popular web and most chosen web software when it comes to website hosting because of its features and value for money. Alongside WordPress is cPanel, which is also one of the most preferred cloud hosting providers. There are various changes that you want to implement in your WordPress account such as changing your nameserver DNS or migrating your website. One of the most challenging actions is using cPanel and subdomains for your WordPress network site.

 

You can set up your WordPress network so you can map the subdomains to you new sites. However, you should not that there are a lot of web hosts and you can add the subdomain to your DNS records, which is the standard way of mapping subdomains to WordPress network sites. Although this is the easy way to do it, if you use cPanel, there is a tendency that editing your DNS records will not work. You need to be familiar with the directions for mapping a subdomain to your WordPress network site using cPanel.

 

Here is an example of how your subdomains will look like:

 

Version: WordPress 3.x

 

If you have three site in WordPress network similar to these:

 

  • example.com/love/
  • example.com/happy/
  • example.com/anger/

 

When you map them to subdomains, they will appear like this:

 

  • love.example.com
  • happy.example.com
  • anger.example.com

 

You should first start with the standard method for setting up subdomains, which includes setting up the WordPress MU Domain Mapping plug-in. Once the plugin is installed and working, the usual next step is to edit the DNS records and add the subdomains. However, you might encounter a challenge when you try this on your cPanel host. The cPanel host seemed to intercept your attempt to set up a separate subdomain. The subdomain site (like love.example.com) would bring you to a confusing page for the host account. Even though cPanel had let me edit the DNS records, this configuration simply did not work on this host. Instead, the solution was to use the cPanel menu option to add a subdomain.

 

Use cPanel’s “Add a Subdomain”:

 

Using this configuration, you do not point the subdomain to an IP address. Instead, you create a subdomain for a particular domain. You point this subdomain to the subfolder within your cPanel installation where you installed the original WordPress site, the site that you later transformed into a network.

 

Remember that when you first installed WordPress, cPanel asked you which subdirectory (subfolder) to install it in, and you typed network. If we looked on the filesystem, we would see: public_html/network/ This folder has the code for the WordPress site. If we browse to example.com, we’ll see this site. When you already had our WordPress site, you turned your site into a WordPress network. After which, you set up a second site on this same network.
 

This process may seem tricky and difficult at first, but once you get the hang of it, the way of adding a subdomain may even be easier than the standard way of editing DNS records. From then on, you can already add more and new WordPress sites without encountering trouble.