You can name the directory something other than 'web', but for this post we will use the default 'web' directory created during the installation of the Drupal 8/9 core-recommended profile. With the release of Drupal 8, it's recommended to install Drupal in the 'public_html/web' directory. With earlier versions Drupal was installed in the 'publlic_html' directory. Why do we Need to Change the Documentroot?ĭrupal 8 and onward represent a significant departure from previous versions of Drupal. The specifics of installing Drupal will come in a later post. In particular, I'm going to focus on configuring the server for a new Drupal 8/9 installation. You will need to have access to your Apache web server configuration files, be comfortable navigating through directories in the terminal, and using the vi editor, or some other text editor, to modify files on your web server. If you are not comfortable modifying these files yourself contact tech support at your web hosting company.
![cpanel whm hosting cpanel whm hosting](https://fiverr-res.cloudinary.com/images/q_auto,f_auto/gigs/221467535/original/a5f9acbb11e927ae05284fb15b85cf337179ee6c/install-configure-fix-cpanel-whm-web-hosting-server.jpg)
Of course, your web server may be configured differently so the instructions below are just a guide.
![cpanel whm hosting cpanel whm hosting](https://www.dailyhostnews.com/wp-content/uploads/2012/07/CPanel_logo.svg_-2100x1200.png)
To follow the guide below you should already be familiar with WHM/cPanel, and basic web server administration.
#CPANEL WHM HOSTING HOW TO#
I'm going to describe how to change the document root on an Apache web server using WHM/cPanel.