The document root is the directory on your server that your website files are served from. By default this is set to /public_html, but you can change it if your application requires files to be served from a different location.
Steps to Change the Document Root
- Log in to the Webfort control panel and go to Websites.
- Select the website you want to update.
- Click Domains in the top navigation menu and select the relevant domain.
- Scroll down to find the Document root field.
- Click the pencil (edit) icon next to the field to make it editable.
- Enter your new document root path.
- Save your changes.
Things to Keep in Mind
- The default document root is
/public_html. Only change this if you have a specific reason to do so. - Make sure the directory you specify actually exists on your hosting account, otherwise your website may stop working.
- Some frameworks and applications (such as Laravel) require the document root to point to a
/publicsubdirectory — this is a common reason for changing this setting.
If you're unsure what to enter here, reach out to our support team and we can advise.