Use the following options to find the document root of a domain on your cPanel server.
With root SSH access
If you have root access to the server, use grep to quickly find the document root in the userdatadomains file:
grep example.com /etc/userdatadomains
IMPORTANT: Do not make any edits to the userdatadomains file.
With cPanel GUI access
If you are logged in to the cPanel account, find the document root for a domain via the Domains icon under the Domains section.
The home icon before the document root represents the home-directory part of the path. The document root shown there is a link to follow to open File Manager inside the document root. The left sidebar shows the exact path that the home icon represents.