It is common for websites to evolove over their lifespan. During this evolution, it is likely that you will change the program used to create the site. You will, however, want to first test new programs to find the ones that are best for you while not interrupting the normal operation of your existing website. This is most often done by installing the program and building a test site within a subfolder or subdomain.
What is a subfolder?
Typically, a subfolder is used to either divide a sites content categorically, such as http://example.com/employees and http://example.com/products or even for storing files such as http://example.com/images and http://example.com/downloads. In this tutorial, we will demonstrate how to install a program into a subfolder so you can test the program and/or build a new version of your site. You will access this area with a URL similar to http://example.com/wordpress
or http://example.com/joomla or even http://example.com/test
What is a subdomain?
Much like a subfolder, a subdomain is used to separate different areas of a site. On the server side, it looks exactly like a subfolder. Accessing a subdomain in the address bar of your web browser is the main difference. For example a subfolder is accessed as we discussed above (example.com/test) whereas a subdomain is part of a domain's URL and the subdomain's name is in front of the main domain, such as wordpress.example.com or test.example.com). You can learn to add a subdomain to your account by following this article.
Installing programs into a subfolder
You can install the new test program by using the Softaculous tool found in your cPanel. When choosing a program to install, you will see an installation data screen. On this screen there is a field that allows you to choose a specific subfolder in which to install the program. This folder name should not already exist and will be created during the program's installation. Generally, you want to name it something significant, such as the name of the program or 'test', for instance.
The In Directory field is where you will enter the name of the folder. For example, it is named joomla. This means the regular website will exist at http://example.com and the joomla version of the site will be located at http://example.com/joomla.
Installing programs into a subdomain
The process of using a subdomain differs slightly from that of a subfolder. The subdomain must already exist, and can be created via the instructions in this guide. Also, the subdomain is chosen by using the dropdown labeled Choose Domain. This means you will delete any default value in the In Directory field, leaving it blank. If we created a subdomain named http://test.example.com, that will be the URL you type in the address bar to visit the test site, while the regular site will still exist at http://example.com.
Feel free to test as many programs as you desire using either method. Testing more than one program at a time with different subfolders or subdomains can help you compare them and see the differences almost side by side. Once you have decided which program you want to use, and have your new site version created, you will be ready to move it from the test folder to your main domain.