How to change Root Folder for primary Domain in Cpanel
If you are having a problem with your root folder for the primary domain in Cpanel then this Article for you.
Cpanel/WHM is the most popular Linux based operating system for controlling personal or dedicated hostings. When the server admin creating an account with a domain system automatically creating its root folder in the system, by following this article you can change your root folder as you want. Please follow the below steps:
Step 1: Log in to your Cpanel and find SSH Access Option, You can create your ssh access details from here.
Step 2: After getting your ssh details, use any ssh client like putty to go inside your system. You can download Putty from here:
Step 3: After login inside your server system by using putty now edit the following command:
# vim /var/cpanel/userdata/USERNAME/MYDOMAIN.COM
Replace USERNAME with your Cpanel ID or Cpanel Account Name
Replace MYDOMAIN.COM with your domain
Step 4: Update Document Root
After editing the file, search for Documentroot and change the path as per your requirements:
Final Step: Rebuild and restart Apache
After change the configuration, you need to rebuild the apache configuration by restarting the apache server.
# service httpd restart
After Restarting your changes will affect your hosting.
If you are stuck or anything, you hire us for an expert hand. Book an appointment with us or call at 477937937.