I was doing some research using Google Suggest to find queries that I can provide answers to for people. One query that popped up was “How do I install WordPress on a subdomain?”
If you aren’t sure, Google Suggest will “suggest” queries to you as you are typing in the search box. It’s sort of an auto-complete system. It’s great for searchers because they could save time by not having to type their full query. It could also help them if they aren’t sure how to spell certain things or how to word their query just right. For us, we can learn what other people have searched for in the past (in most cases) and provide solutions to them.
In a nutshell, I look at Google Suggest to find problems that I can help to resolve.
So, as I typed “how do I WordPress” and I inserted each letter of the alphabet just before the “W” in WordPress I came acros: “how do i install wordpress on a subdomain?” so I thought I’d asnwer that in an article and video today.
Truth be told… the answer is simple and does not require a long article or a video. The answer is simply: the same exact way you would install WordPress into a root domain, you would install it to a sub domain.
However… there are many ways to create a subdomain (depends on the host), and there are many ways to install WordPress. So, in this article I thought I would dive deeper into this query and make it specific to the host that I use, and the tools that I work with when installing WordPress.
How to Create a Subdomain on Pair.com Hosting
I switched from GoDaddy to HostGator, and now to Pair.com for hosting many of my web sites. All three of them had different control panels for server management. Here’s the procedure for adding a subdomain at Pair.com. This assumes that you already have a Pair account, that you already have a domain registered, and that you are loogged in.
I cover all these steps in the video as well.
- Click Domain Hosting Management >> Add a New Domain Name.
- Click Add a Subdomain of a Domain Already on Your Account — newsite.example.com.
- Enter a name such as “blog” for your subdomain in the text box.
- Drop down the list and choose the domain name you want to attach the subdomain to.
- Choose the hosting option. Shared is free.
- Click “Proceed.”
Now, by default, a new folder will be created in your “public_html” folder. It will probably be something like “blog.domain.com.” That is where you will install your WordPress files to. Remember, that’s just a folder that your subdomain “points” to when browsing on the web. It doesn’t have to exactly match the subdomain, although it is simpler when it does.
Create a Database for your WordPress Site in the Pair.com Dashboard
The procedure for creating a MySQL database will vary between web hosts. Pair.com will automate much of it which I generally don’t like, but in the case of databases, I’m happy to have it done for me. Creating databases with Pair is a snap. Here are the steps.
- Click Database Management >> Create a New Database.
- Give it a name.
- Click “Add Database.”
And that’s all there is to it. On other hosts you will have to create a DB user, attach that user to the database, and choose to give that user “all privileges.” Not with Pair. They create 3 users for you automatically with various rights.
Now, for the wp-config.php file in the next step, we will need some database values. You will see them all on the screen following the steps above.
Make note of:
- Database name (the prefix was added automatically, include that in the WordPress config file).
- Database server.
- Full access username.
- Full access password.
Download WordPress and Modify the Config File
In these final steps you will download WordPress, extract it, and modify the config file, then upload the files to the server.
- Go to WordPress.org and download the installation zip file to your computer.
- Extract the files on your Desktop using whatever zip utility that you have. Windows users will have one already included with the Operating System. Just right-click the zip file and click on Extract (or something similar). Otherwise, download WinZip or WinRar if they are still available for free.
- Open the “wordpress” foleder and locate the file called “wp-config-sample” and remove “sample” from the file name.
- Open wp-config.php in a text editor (I use TextPad).
- Locate the spots where you enter the database related values gathered in the previous step. It may be best to peep the video to see what I mean.
- Optionally do the simple security steps I demonstrated in the video (like adding the “salt” values and renaming the table prefix).
- Upload the files to your FTP server in the folder that was created for you inside the “public_html” folder. The folder name may differ depending on your host. I’m speaking of Pair.com here.
Now, browse to the subdomain, and fill in the boxes to complete the installation.
If you find that the “page is not found” then just wait a little bit. Just like a domain name, a sub domain needs to “propogate” before it is accessible. The friendly name that we gave it has to be translated to an IP address, and your Internet Service Provider (in general) will be gathering that information at set intervals. Just be patient, it will do it’s magic in the background 🙂
I know that I skimmed over certain steps such as using FTP and uploading files, but this article would be way too long if I covered everything. If you watch the video that I embedded in the article I think that you will be able to pick up on how to do it all. If not, check the tutorials for the software you are using. Or check YouTube for further tutorials on very specific topics. You can also ask your host for a hand. Otherwise, browse around on this site, the questions you have may have already been covered. Also, feel free to comment below.