What are best practices for setting the Document Root in PHP installation?

When setting the Document Root in a PHP installation, it is important to ensure that the correct directory is specified to serve as the root directory for the web server. This can be done by updating the configuration file of the web server, such as Apache's httpd.conf file. The Document Root should point to the directory where your PHP files are located to ensure they can be accessed by the web server.

DocumentRoot /path/to/your/directory