Install WordPress on a subdomain of an existing WP site - WordPress Subdomain | WP Learning Lab

Install WordPress on a subdomain of an existing WP site – WordPress Subdomain | WP Learning Lab

Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist:

Install WordPress on a subdomain of an existing WP site – WordPress Subdomain | WP Learning Lab

Download your exclusive 10-Point WP Security Checklist:

A WordPress subdomain install is done in a very similar way to installing WordPress in a domain root. We just install to a different folder.

First thing is to create the subdomain. Inside your cPanel account you should have a link called Subdomain. Click on it.

Then fill in the simple form on the next page. Enter the word or phrase for the subdomain, pick the domain that it will be sub to and then enter the path for the subdomain’s document root.

Then click on Create. Your subdomain has been created. It’s that easy.

In the create process a new folder was created inside the root folder of the main website. That is where we’ll upload fresh WordPress files in a few minutes.

But first, we’re going to create the database.

To do this, go back to your cPanel and open the MySQL databases page. Enter a name for a new database and create it. Make note of the database name because we’ll need in a minute.

Next, and on that same page, create a new user and give them a unique password or use the password generator.

Make note of the username and the password.

Now scroll to the bottom of the MySQL database page and link to the user to the database and give them all privileges.

The database is now created and ready.

Now we’ll upload new WordPress files.

Go to and download the latest WordPress installation package to your computer.

Next, log into the File Manager in hosting account and open the root of your website. Inside that root folder should be a folder with the same name as you chose for you subdomain. Open that folder.

It should be empty.

Now, click on the Upload link in the menu system. It will open a new window or a new tab. Click the button to open the file browser and choose the WordPress files you just downloaded.

It should complete very quickly. Once complete, you can close the upload window/tab.

Now hit Reload in the File Manager. A zip file should appear. Click it to highlight it and then click on Extract in the top menu.

Click on Ok on the dialog box that pops up to begin extraction.

Click on Reload again so you can see all the files.

Click on the wp-config.php file and then click on Code Editor to open that file in the editor.

Find the section where the database credentials go and copy the info from your database in there. Click on Save Changes when you’re done.

Now, open your subdomain in a new browser tab or window. You should be presented with the familiar WordPress installation screen.

Install WordPress as normal.

Once installed you can log in and now you have a WordPress site in a subdomain. Pretty sweet!

I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.


If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.

Connect with us:

WP Learning Lab Channel:



Google Plus:


46 thoughts on “Install WordPress on a subdomain of an existing WP site – WordPress Subdomain | WP Learning Lab

  1. Just found this tutorial and I have been looking for this for a while. Would be great to know when this is useful, what are the advantages of breaking up a website in sub-domains as opposed to all in one. For example, I have a website that has a store, news aggregator, blog, community and lms. I was thinking of breaking it up to have the store in a sub-domain and the LMS as well. Thanks Bjorn!!!

  2. wonderful, it works great…. but could you tell me, when I build a site (for a customer) this way in my subdomain, can I just copy the total folder(to the customers webspace) when the customer is happy with what I build in my subdomain? thnx very much

  3. I assume the 92 likes were from people who didn't watch the video first and followed you step by step only t run into an error lol! Great video though!

  4. Hey man, I did this via godaddy hosting and what they did was give you the domain/support instead of support.domain. Does that make any difference?

  5. This configuration is required for each subdomain individually, do you find my video helpful for creating subdomains from your Dashboard.

  6. Hi Bjorn!! I love your videos have been using you as a reference for a while now. Have a question though. I have a new hosting platform. I want to add templates under a sub-domain. But I need wordpress in it. I've followed your instruction but my cpanel doesn't have the code editor. Any suggestions?

  7. Good day, i already tried all the steps but at the point where i ought to edit the 'wp-config-sample.php', but i can not.

  8. Thanks for responding, it was all over the place for me, way above my head. No idea as to what was going on. No idea as to why I should or needed to add a sub domain. Just wasn’t clear as to the reason for it’s purpose. I did try to grasp your teaching but just couldn’t follow your concepts. I had watched a video you previous made and found that to be a head spin too. I know that you are technically incredible, but relaying that knowledge and know how across to me seems to be a bridge to far. I think I need to watch simpler videos of explanations before I can advance to yours. 🚀👍🏼

  9. That was a very useful tutorial.

    I have already developed my website using WordPress and now I want to develop something else in my subdomain and I am not able to find cpanel. How do I do. Please help.


  10. thank you bro but i followed you until last but still I couldn't install WordPress because these message the site cant be reached

  11. If you cant edit the code just press the "edit button" instead. Im not sure why it grays out the original button but that worked for me.

  12. Well, I tried to do what you said, it didn't work, so I tried it all over again. But the changes I made when trying to start all over not only made my second attempt not work but my website is all efed up now.. im hoping host gator can fix what I did, I had a LOT of work done on my website, 🤕🥺😭

  13. I already have 2 WP installations on different servers. How do you proceed then? It's not a problem to create a subdomain on the main website, and point it to a second IP, but what do I do there? 😀

Leave a Reply

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