How to reorder several domains under client cPanel files ?

crossing

Active Member
Oct 23, 2012
32
0
56
cPanel Access Level
Reseller Owner
How to ordonate several domains under client CPanel files ?

I mean right now my client has only one domain and its fully loaded under public_html folder. I need all domains to be listed nicely in public_html folder, for example public_html folder should have site1.com and site2.com. How to achieve that ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello :)

You could use FTP, File Manager, or SSH to manually move the website files into directories named after their domain names. You would then have to update the document root for the primary domain name by editing the "documentroot" entry in the appropriate cPanel user data file:

Code:
/var/cpanel/userdata/$username/$domain.com
Then, rebuild the Apache configuration file via:

Code:
/scripts/rebuildhttpdconf
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
I will have to do that every time the client add new domain ??
No, they can choose the document root path when adding the Addon domain names in the cPanel interface.

Thank you.
 

crossing

Active Member
Oct 23, 2012
32
0
56
cPanel Access Level
Reseller Owner
Hello, I have another question , can I move also the main to addon domain by editing this file /var/cpanel/userdata/$username/$domain.com ? Also there is any way to totally remove main domain ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463