Install WordPress on Subdomain

WordPress is normally installed to a domain or a sub directory in the domain root. But sometimes we might want to install WordPress on subdomain. This WordPress tutorial will discuss how to create a sub domain and new database in cPanel and install WordPress in a subdomain.

How to Install WordPress to a Subdomain?

Here is a list of the steps:

  • Step 1. create subdomain
  • Step 2. create WordPress using a subdomain either manually or automatically.

If you choose to manually install WordPress, the steps are as following:

  1. create mysql database
  2. download & upload WordPress installer
  3. create database connection
  4. Run wordpress installer

Want to install WordPress automatically?
Continue reading. We will point you in the right direction below.

Create subdomain in cPanel

Log on your cPanel with your control panel username and password. Scroll down to the Domain Management section. Click on Subdomains.
manage subdomain in cpanel

To create a subdomain in cPanel is very easy and intuitive. You firstly choose your domain from the right jump down list. If you have multiple domain hosted in the same hosting account and can’t see your target domain, click on the jump down list to select the domain. Then input the subdomain name before the root domain. In this guide, we will create a subdomain as demo.betterhostreview.com. create subdomain in cpanel

When you create a subdomain with Bluehost web hosting, you will need to asign or create a home folder for the subdomain. By default, Bluehost will automatically create a new folder and use your subdomain name as the folder name. You can however manually change the folder name. See above screenshot.  Click Create  button, your new subdomain will be created and pointed to a folder in cPanel File Manager.

Note: Now you have two options, you can either install WordPress automatically on the subdomain or you can manually install it. If you want to use the auto-installers, see below example:

In following steps, we will show you the general steps to install WordPress on any web hosting servers.

Create WordPress Database in cPanel

Every WordPress installation requires a MySQL database. Now we go to create WordPress database in cPanel. From the home page of your cPanel, find the Databases section, click on MySQL Databases icon below it.

manage mysql database in cpanel

You will be taken to a new page in cPanel where you can create new databases, create new database users with password, and assign users to databases.

create mysql database in cpanel

Download & upload WordPress installer

The WordPress is an open source system to create websites and blogs. You can download this free CMS from http://www.WordPress.org/download/ You can download the web installer in .tar.gz or zip formats. cPanel will be able to uncompress them after you uploading to your hosting account.

To upload the WordPress installer from computer to your web host, you can use a FTP client or simply upload from the cPanel >> File Manager.
upload files in cpanel
Once the WP installer uploaded to server, you can right click on it to unzip it in cPanel. Make sure to move the extracted files to your subdomain root folder if you do not want to install it to a sub folder.

Create WordPress database connection

In last steps, we have created a MySQL database for WordPress in cPanel, after that we upload the installer to the web server and unzip it. Now we need to create database connection for WordPress, so the web application can connect to the database, store and retrieve data to/from the database.

We have another guide coverred this topic, you can refer to this link: Create WordPress Database Connection.

create wordpress database connection in cpanel

Run WordPress Web Installer

The last step to install WordPress on a submdomain is to run the web installer from browser. Open the installation URL in a web browser. It will be like this http://sub.yourdomain.com/wp-admin/install.php. In this example, it is http://demo.betterhostreview.com/wp-admin/install.php. From the web installation interface, you need to input information including: Site Title, Username, Password and Email.
wordpress web installer
Fill up the information the WP web installer requires and click Create WordPress button at the bottom, your new WordPress will be installed to the selected subdomain.

2 Comments

Leave a Reply