Introduction
Before getting started, it's important to note that there's no real benefit in adjusting a pre-existing addon domain's document root. Unless the change is strictly for visual purposes or to cater to a development request.
Other than that, you're usually better off keeping the document root for the domain set. Changing the document root for an addon or subdomain at times may break the site as the hard links and paths declared within the web application or database may no longer exist. In such a scenario, consulting a systems administrator or developer may be beneficial.
Procedure
As with everything, we encourage you to create a backup of the addon or subdomain's contents in the event a restore is required. Instructions regarding this can be found below:
How-To Manually Transport Backups to Remote Backup Destination
Once that's out of the way, we can get started.
- Log in to the cPanel account the addon or sub-domain is located in.
- Access the "Addon Domains" or "Subdomains" interface depending on the domain.
- Locate the domain to change the document root for under "Modify Addon Domain" or "Modify a Subdomain".
- Click on the pencil icon next to the path, under the "Document Root" column.
- Enter the new document root for the domain, and click "Change".
These changes should go into effect immediately.
NOTE: You will still have to manually move the site's contents into the new document root. This change only lets Apache knows where to look for the domain's contents.
Comments
0 comments
Article is closed for comments.