Change DocumentRoot of main site in CPanel

To change the document root of a main site in CPanel you'll need root SSH access. Note that you will be able to change an "Add on domains" via the GUI.


# vi /var/cpanel/userdata/{myusername}/{}

Once in Vi change the documentroot: /home/{username}/public_html  to whatever you want (eg /home/{username}/public_html/ )

Afterwards you'll need to run this command:

# /scripts/rebuildhttpdconf