How to Change the Document Root Print

  • 0

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

  1. Log in to the Webfort control panel and go to Websites.
  2. Select the website you want to update.
  3. Click Domains in the top navigation menu and select the relevant domain.
  4. Scroll down to find the Document root field.
  5. Click the pencil (edit) icon next to the field to make it editable.
  6. Enter your new document root path.
  7. 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 /public subdirectory — 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.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution