How to check my site's document root
Confirm the root directory / document root of a WordPress site
Marc
Last Update 4 months ago
This topic covers processes relating to a cPanel service.
You will need to be logged into the cPanel account to follow the steps.
If you're not sure how to access your cPanel service — please, follow this guide before continuing: How do I Login to cPanel?
The document root, also known as a root directory, is the directory/folder where all a website’s files are stored.
This special folder is publicly accessible from the internet which is why, by default, it is named “public_html” in many cases.
There are some circumstances where a site’s document root might have a different name – in the case of sub-domains or add-on domains for example.
To find the correct location of a site’s document root, please follow the steps below.
Method 1: Using the "Domains" tool in cPanel
1. First, login to cPanel
2. Click the 'Domains' tool located in the Domains section of your cPanel dashboard.
3. Look for your domain in the list shown in the Domains tool
4. Note the path shown in the 'Document Root' column.You may see /public_html or something else like /domain.com or /sub.domain.com etc.
- In the example image below, you can see the domain 'shop.yourwebsitedomain.com' is displaying '/public_html/shop'.
- This means, the folder named "Shop" that's inside the folder named "public_html", is the Document Root for "shop.yourwebsitedomain.com".
Method 2: Using the WordPress Toolkit in cPanel
If your WordPress installation is synced with or was created via the WordPress Toolkit;
2. Click 'WordPress Toolkit' located in the left side menu of the cPanel dashboard.