It is a common practice to test and/or build a new site version while maintaining the current version on the web. This way site visitors can continue to interact and the website business is not interrupted while the new content is designed or the software is tested. For this guide, we will be moving a new site, located in a folder named newsite to the root folder of a hosting account, public_html.
Removing the old site files
Simply copying the new site files over the old files may work, but it may also leave you with extraneous files and other useless code. It is best to clear out the old site completely before moving the new files in. First, use your cPanel File Manager and navigate to the Web root of your account, this is known as the public_html folder. Below you can see our example account. There are a couple of folders and several files in the public_html folder.
Be careful when removing the files and folders. You do not want to simply delete everything in the public_html folder as it would also delete the newsite folder that contains your new site information. Use the cPanel File Manager toolbar and delete each folder you do not need individually. This would be the images folder. The cgi-bin folder is standard on all accounts and should generally be left alone.
As for the files in the public_htmlfolder, you can delete them either individually or by highlighting them all at once. Most browsers allow this by clicking on the top file and then holding the Shift key while clicking the bottom file. Once highlighted, you can click the Delete icon from the toolbar, removing them all. Once your public_html folder is clean, you should only have the cgi-bin and the folder with your new site’s information, in our case, the newsite folder.
Copying the new files to the root folder
Once you have removed the old site files from the public_html you are ready to move the files. Using the file manager, enter the folder you have the new site files in. In our example, it is the newsite folder. From there you will see all the files and folders that are for the new site.
To move the files and folders, you first need to highlight them all. While this can be done individually, it is best to highlight them all at once. To do so, click on the topmost file to highlight it, then scroll to the bottom of the page and highlight the last file while holding the Shift key. This highlights all the files.
Next, click on the Move icon found in the upper menu bar of the page. A popup will appear asking for you to identify the destination of the move. Make sure the destination path is simply ‘public_html‘. Click the Move Files button to begin the move.
Your old subfolder should now be empty and all files should now be in the public_html folder. This completes the physical move of the files. You may test your site at this point, but be aware that many of the programs such as WordPress or Joomla will require configuration file changes. Each program is individual and instructions will need to be found for each respective program. Typically this is found by searching ‘folder configuration change’ for the program.