A subdomain is a domain name that is a part of a larger top level domain name. In simple words subdomain is a second website which can be used to host content different than a main website.
In order to install wordpress on subdomain, the CPanel server software is easy to use. Just follow the simple step-by-step guide:
Log into your web hosting account and click Subdomains option. Fill in the subdomain field from the next screen and hit Create button.
The next step is to create a MySQL database that WordPress is going to use. For this, scroll down to the Databases section on the home page of Cpanel and select MySQL Database Wizard.
Enter your desired name in the New Database field and click Next Step.
In the next screen, enter in your username and a password and click on Create User. Now tick the ALL PRIVILEGES check box and hit Make Changes.
Your database has been now configured. Click on the Home button to start the actual WordPress installation.
Now open File Manager from the icons list of the CPanel main screen. Click on Next from the next screen and select your subdomain and Click Go.
From the File Manager toolbar click the upload button and direct to the location where wordpress.zip is saved. Click on the wordpress.zip file to start uploading. After the completion of process return to the home page by clicking Go Back.
Select the WordPress.zip and click the Extract button from the File Manager toolbar. A mini window will be appeared. Click Extract Files. After the extraction of files, close the window.
A folder named wordpress will be appeared in the file manager, double click over it to open.
Here you will see a list of all extracted files. Click on the Select All button. Now, click on Move File icon from File Manager toolbar.
Click Up One Level from the File Manger Toolbar, the subdomain’s root directory containing all your files will be appeared. Find the file named wp-config-sample-.php and select it. Remove “-sample” from it so the filename turns into wp-config.php.
Select the file again and click Code Editor from File Manager toolbar. Fill in the database name, username, and password in the Code Editor and click Save Changes.
Now the CPanel portion of your WordPress installation has been done. Direct to your subdomain and finish the installation. You will see a WordPress welcome page, fill in the details and click Install Wordpess.