making sub-domain to a domain

mross

Member
Feb 2, 2012
7
0
51
cPanel Access Level
Website Owner
At the moment i have a folder under the main directory with a wordpress install that I'm getting ready to go live.
www.mymainsite.com/folderwithcontent.

I now have to make /folderwithcontent live.

Do I go to cpanel>addon domain and when it asks for the directory, enter 'folderwithcontent'?
Or do i have to create the folder through cpanel addon domain first and then migrate all the content to it?:confused:
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you want an addon domain to show the contents of mymainsite.com/folderwithcontent, then you would put that directory as public_html/folderwithcontent for the document root for the addon domain in cPanel > Addon Domains area.
 

mross

Member
Feb 2, 2012
7
0
51
cPanel Access Level
Website Owner
Thanks -
so can I move the whole folder across and then under Addon Domains point to the existing folder, or do I have to first do Addon Domain? If this is the case, do you just move all the content from one folder to the new one?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Why do you have to move the contents at all? Why not just set the folder to the one with the installation already? The folder can already exist when creating the addon domain and it makes far more sense to use the existing folder than to move things. It's up to you, but if you move it, then you'll probably have to reconfigure WordPress to point to the new location.
 

mross

Member
Feb 2, 2012
7
0
51
cPanel Access Level
Website Owner
Sorry, it was more of a question because I don't know the best way to do it (I am confused).
Could you please clarify that if the folder is already in 'public_html' then I just have to go to addon domain and point to that folder? And I won't lose any data in that folder?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If the folder already exists, then you can use that folder for the addon domain creation. Please note that you could make a backup if you are worried about any data loss. To make a backup, you could go to cPanel > Backups area for a full backup, or you could download the contents of the folder using FTP. The beauty of a backup is that it ensures you don't have to worry about data loss because you cannot then lose data.

If you want to see how it works before using that specific folder, you could always create a fake addon domain pointing to a test folder that you place test files, then see if the folder is overwritten or not. It won't be overwritten.