Why won't my cPanel document root changes take?

Linode Staff

I'm trying to change a site's Document root using cPanel and when I submit the change, it never takes. What's going on?

2 Replies

If you are trying to update the main domain, you'll need to log into your Linode server via SSH to locate and edit the below file. Make sure to replace your user & domain info.

/var/cpanel/userdata/USERNAME/DOMAIN.COM

Then, you can follow the steps outlined below to complete the change:

  1. Open the file and look for the following line:

documentroot: /home/USERNAME/public_html

  1. Save it and exit.

  2. If you have SSL installed, the configuration file for SSL will also need to be update.

This file is available at the location:

/var/cpanel/userdata/username/domain_SSL .

  1. Rebuild the Apache conf and restart Apache:

/scripts/rebuildhttpdconf

service httpd restart

There are the instructions for modifying an addon domain using cPanel's web interface. I recommend reaching out to their support or the cPanel community if you are having trouble with this.

cPanel Support Resources:

Also, make sure the files/directories you are trying to modify have the correct ownership/permissions for same.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct