How to install WordPress on Subdomain

A subdomain is an entirely different site to your primary domain. It is useful if your subdomain content is entirely different from original directory content. It also saves money because you don’t need to buy a new domain for your different content. For ex: google.com is a search engine while maps.google.com or mail.google.com are Maps and Emails website. Google built them on its subdomain because they are having a different niche than google.com.

Matt Cutt also said on this:

My personal preference on subdomains vs. subdirectories is that I usually prefer the convenience of subdirectories for most of my content. A subdomain can be useful to separate out content that is completely different. Google uses subdomains for distinct products such news.google.com or maps.google.com, for example. If you’re a newer webmaster or SEO, I’d recommend using subdirectories until you start to feel pretty confident with the architecture of your site. At that point, you’ll be better equipped to make the right decision for your own site.

Benefits of Subdomain

If you’re having a website of a different niche, then it is advised to use different subdomains for a different niche rather than having a separate subfolder for a different niche. Google also recommends focusing on just one niche on a single website. So if you have subdomains, then you can concentrate on the various niche. You can also make country-specific sites. For ex: If you’re having a news website, examplenews.com, you can post Indian News on in.examplenews.com, or US news on us.examplenews.com, etc. But we are here not to discuss benefits of subdomains but how to install WordPress on a subdomain. For installing WordPress on subdomains, we first have to create a subdomain for it. You can read my article below or watch my video on it.

How to create a subdomain?

First login to your cPanel account. Scroll down, find an option that says Subdomain and click on it(See the pic below):

Install WordPress on Subdomain

Now you gave to name your subdomain. For ex: I called it ‘test.’ Then click on Create.

Install WordPress on Subdomain

 

Then it must show a message saying “successfully created.”

Install WordPress on Subdomain

 

Now we have to build Database for our subdomain. For creating a database, go back to cPanel home and click on MySQL Database Wizard.

Install WordPress on Subdomain

 

Now name your database to whatever you like. I will call it to ‘test’. Then click on Next Step.

Install WordPress on Subdomain5

 

In the next step, you have to create User for controlling your database. Fill out the information needed. For any help in creating a user, See the pic below. After it, Click on Create user.

Install WordPress on Subdomain6

 

When the user has been created, In the next step you will see a message saying “You successfully created a MySQL user named ‘username’ .” You will see user and database info. Copy that info as we will use this information later.

Install WordPress on Subdomain7

Below that, you will have a table with some privileges. In this, you can select what privileges can the user (which you just created) can have. We will select “All Privileges“. Then click on Next Step.

Install WordPress on Subdomain8

Now you must see a successful message as shown below.

Install WordPress on Subdomain9

Now you have created a subdomain, database, and user for the database. In the next step, you want WordPress file for installing WordPress on your subdomain. For it, go to WordPress download page and download the .zip or .tar.gz file.

Install WordPress on Subdomain

Now open your cPanel and go to File Manager. Then go to public_html > test (because this is my subdomain name). You will see the below file. It must be empty. Click on Upload for uploading WordPress File.

Install WordPress on Subdomain11

When the file is uploaded and extract the file. After it, you must see below pic.

Install WordPress on Subdomain12

You will see a file named wp-config-sample.php. You have to rename it to wp-config.php. After renaming it, Edit the file by right-clicking on it and click Edit.

Install WordPress on Subdomain13
Now, you have to write database name, username, and password.

Install WordPress on Subdomain 14

Go to https://api.wordpress.org/secret-key/1.1/salt and copy the unique phrase(it looks something like below). These phrases are for security purposes so it is important to use them.

Install WordPress on Subdomain15

Paste your unique phrases in the section which says ‘put your unique phrase here.’Install WordPress on Subdomain16

Installing WordPress on subdomain

Now when you have done pasting phrases, save the file and refresh the file manager. Now go to yoursubdomain.yourdomain.com/wp-admin/install.php for installing WordPress on your subdomain. For ex: in my case the URL is test.bloggerforever.com/wp-admin/install.php. Then fill all the information needed (you can take help from below pic). After filling all information click on “Install WordPress”.

Install WordPress on Subdomain17

Now you can see your WordPress dashboard.

Install WordPress on Subdomain18

Conclusion

Installing a WordPress on a subdomain is better than the subdirectory. It is good for your blog’s SEO. You can change the theme of different subdomains according to its content, type or category. You can comment below for any questions, feedback or suggestions, I’d be happy to read them. 🙂

You May Also Like

About the Author: Aman Sharma

2 Comments

Leave a Reply

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