Step 1: Login to cPanel Server
Use SSH to get shell access for your server as root account, using your favorite ssh client. I have connected our server using PuTTY. Now edit following file.
# vim /var/cpanel/userdata/USERNAME/DOMAINNAME.COM
[emptybox]Change USERNAME with your cPanel account name.
Change DOMAINNAME.COM with your Primary domain name.[/emptybox]
Step 2: Update Documentroot
After editing file, search for text documentroot and change path as per your requirements.
documentroot: /home/USERNAME/public_html/NEW_PATH
Step 3: Rebuild and Restart Apache
After making changed, we need to rebuild Apache configuration file and restart Apache server. Use following command to do it.
# /scripts/rebuildhttpdconf
# service httpd restart
Your changes will be permanently updated. Check your site for reflecting changes.